Bwa - Picard - Gatk Pipeline: How To Set The "-M (Mismatch Penalty)" Option For Bwa?
1
0
Entering edit mode
11.4 years ago
newDNASeqer ▴ 790

I have been testing the BWA-Picard-GATK pipeline today, and did not realize I should have set the -M option for bwa until I got error message when I use Picard to mark duplicate reads. It throws an exception, and I found a post saying that the "-M" should be set for bwa in order to make it compatible with Picard and GATK. So I am asking what value I should set for the -M option? what's the range of the alignment score?

-M INT Mismatch penalty. BWA will not search for suboptimal hits with a score lower than (bestScore-misMsc). [3]

bwa picard gatk • 5.6k views
ADD COMMENT
4
Entering edit mode
11.4 years ago
matted 7.8k

I believe you are confusing two flavors of bwa: bwa mem and bwa aln. bwa mem is new and requires the -M flag (with no argument) to produce compatible output for Picard and GATK. The mismatch penalty option you are quoting is for bwa aln, which is not the problem here (its output will be compatible with Picard and GATK already). See the updated bwa documentation.

ADD COMMENT
0
Entering edit mode

yes, I was confused until I saw your post. Then I will post the error message from running Picard MarkDuplicates

ADD REPLY
0
Entering edit mode

finally figured it out. Nothing wrong with my bwa aln commandline. The source of the problem was that the .bam file was not sorted by "coordinate". I then used Picard to sort the .bam file. For example: java -Xmx5g -jar $CLASSPATH/SortSam.jar INPUT=2.bam OUTPUT=2_sorted2.bam SORT_ORDER=coordinate

thanks

ADD REPLY

Login before adding your answer.

Traffic: 1685 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6