This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Contradiction between MAPQ=0, XA tag and FLAG=256 for multiple alignment hits in BWA results

I intended to find all the non-primary alignments in the bam generated by bwa. After searching for solutions, I got different answers including using MAPQ=0, XA tag and FLAG=256. As far as I understand, these three indications are the same to tag not uniquely aligned read. However, the filtering using each criteria give contradictory result. For example, selecting by 'XA:' tag gives alignments of various MAPQ and FLAG value and vice versa. Is there anything I am missing for this case?

bwa bam

Check the post: bwa mem and multiply mapped reads

I think the XA tag is used to report alternative alignment, not secondary alignment, the best way to get primary alignment should be using flag 256

Thanks, the link helps

0 answers

No answers yet.

Log in to answer this question.