This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to interpret sam file generated from BBMap?

enter image description here

I'm trying to figure out exactly which reads mapped to which sequence in my reference.

From the above, it looks like both: NS500647:152:HGNYTAFXX:1:11101:24950:3577 1:N:0:TTACCGAC and NS500647:152:HGNYTAFXX:1:11101:24950:3577 1:N:0:TTACCGAC were mapped to contig NODE_88_length_45187_cov_8.09805 but what about the ones without a reference in this field? Were these reads not mapped at all? If I wanted to get the reads that mapped to a specific reference, would I just ignore those?

alignment sequencing

2 answers

You need to learn to interpret sam flags.

http://www.samformat.info/sam-format-flag

But yes, those reads with no mapping position did not map to anything in your reference.

Check Decoding SAM flags, flags 77 and 141 indicate unmapped reads. There are several posts on how to filter sam / bam files, if you search the forum you will find.

edit

hint: check samtools view to get reads mapped to just one chromosome.

Log in to answer this question.