This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Manually Search Sam/Bam File

Hi All,

I would like to map short reads against a reference database for viral discovery using bowtie2. However, since I don't know what I'm looking for, I need a way to parse the output to filter out spurious hits and focus on more interesting things. I was hoping there was a way to format a sam/bam file similar to the tabular output using Blast. Or at least a way to get a list of headers from the bowtie2 index and correlating sequences/mapQ scores from my data. Any suggestions? Thanks! And FYI, I was originally Blasting my sequences but it was prohibitively slow.

alignment

Hi Richard,

I guess I should say I originally used kraken2 since I was already classifying the bacterial sequences (it is SRA Metagenomic data), and then made a separate viral database. however, I didn't get any assigned hits, so I tried blasting, the results of which I got impatient for (been about 5-6 hours, still running), so in the meantime I figured I'd try to align them. About 30 percent of the sequences aligned, which is WAY too high, I expected something under 1%, but higher than zero.

so I tried blasting

With small reads, you're better (and faster) off to use an aligner/mapper such as bwa or bowtie(2).

2 answers

Are your reads in fastq format? If so it sounds as though you may want to look at using Kraken Kraken can take reads in fastq format and screen them against the organisms in the NCBI database to tell you which taxa are present.

Found an easy solution. Just read it into R using Rsamtools!

Log in to answer this question.