This is a test version of Biostars. For the public version, visit https://www.biostars.org.
BAM - number of mapping positions per read

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?

sam bwa bowtie bam

1 answer

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

Thanks, I'll check this out.

Log in to answer this question.