Can someone explain what the -M option in BWA-MEM does?
1
0
Entering edit mode
3.3 years ago
James Reeve ▴ 130

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.

-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.8k views
3
Entering edit mode
3.3 years ago

"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.

0
Entering edit mode

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

0
Entering edit mode

Correct.

0
Entering edit mode

Does this also include picard tools in GATK ?