yes, I was confused until I saw your post. Then I will post the error message from running Picard MarkDuplicates
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]
1 answer
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.
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
Log in to answer this question.