This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Number of secondary alignments per read

Hello! If I have a SAM file produced by aligning using BWA-MEM, is there a way to tell how many secondary alignments each read produced, or how many reads produced how many secondary alignments? Let's say I do samtools flagstat and see that I have 100 secondary alignments. I want to know whether that's because one of my reads mapped to 100 different places, or because 100 reads each mapped to one secondary location, or anything in between. How can I extract that information from the SAM file? Thank you!

bwa bwa-mem samtools alignment

if you combine the read ID with the match ID (+position) you should be able to deduct this. Your first situation would look it one to many, the other many to many .

0 answers

No answers yet.

Log in to answer this question.