Is it possible to determine the number of different mapping positions detected for a given read, based on the BAM output of bowtie2? How about BWA / Minimap2?
Is it possible to determine the number of different mapping positions detected for a given read, based on the BAM output of bowtie2? How about BWA / Minimap2?
You need to define what you mean by 'different mapping positions detected'? All the aligners mentions use an approach that matches part of the read (a 'seed') then extends the alignment. Some of those extended alignments turn out to be terrible and are discarded. Each aligner uses a different approach.
For bwa, the options to control alternate alignment reporting are:
-c INT skip seeds with more than INT occurrences [500]
-h INT[,INT] if there are <INT hits with score >80% of the max score, output all in XA [5,200]
-a output all alignments for SE or unpaired PE
Note that if there many many possible alignments, bwa may possibly report 0 alignments, or not write the XA tag
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Something like this: http://lindenb.github.io/jvarkit/Sam2Tsv.html