This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Can someone explain what the -M option in BWA-MEM does?

I'm reading abput BWA for my project which involves SNP calling for whole genome pool-seq data. I've noticed a few online tutorials for BWA-MEM specify the -M option for a basic alignment. I don't understand what this option is doing.

Reading the manual it says;

-M Mark shorter split hits as secondary (for Picard compatibility).

What does 'split hits' mean?

What types of data should this option be used for?

bwa alignment

1 answer

"Split hits" here means chimeric alignments, otherwise known as "supplementary alignments", such as when part of a read aligns to chr1 and the rest to chr4. By default, bwa mem will set bit 0x800 for the shorter segments of such alignments. Apparently some versions of picard didn't like that and either break or throw an error. The -M option is supposed to set bit 0x100 (secondary alignment) instead. To my knowledge this isn't actually needed with remotely recent versions of picard.

So is -M just a way to adjust your output for Picard?

Log in to answer this question.