I am trying to work out what tools use the secondary alignment feature of the sam format. My understanding is that there will always be exactly 1 primary alignment for each read, and secondary alignments could arise because the aligner cannot decide the exact best alignment.
Does BWA / other aligners emit secondary alignments?
Which downstream tools use secondary alignments? Haplotypecaller?
1 answer
For RNAseq quantification, RSEM, eXpress and Salmon (when quantifying reads from BAMs) include secondary alignments in their quantification. Probably all mappers output secondary alignments, but implementation details may vary, and often there are flags to alter this behaviour. For example, bwa mem -M will mark shorter split hits as secondary instead of suplementary, or STAR --outSAMprimaryFlag AllBestScore will mark all multiple alignments with the same best score as primary.
I am not aware of other tools that use secondary alignments, but this doesn't mean they don't exist.
Log in to answer this question.