Question: Bwa - Picard - Gatk Pipeline: How To Set The "-M (Mismatch Penalty)" Option For Bwa?
0
gravatar for newDNASeqer
6.1 years ago by
newDNASeqer650
United States
newDNASeqer650 wrote:

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]

gatk picard bwa • 3.9k views
ADD COMMENTlink modified 6.1 years ago by matted7.1k • written 6.1 years ago by newDNASeqer650
4
gravatar for matted
6.1 years ago by
matted7.1k
Boston, United States
matted7.1k wrote:

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 COMMENTlink written 6.1 years ago by matted7.1k

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

ADD REPLYlink written 6.1 years ago by newDNASeqer650

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 REPLYlink written 6.1 years ago by newDNASeqer650
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2068 users visited in the last hour