diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java b/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java index 93921b6ad..e52fd81c4 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java @@ -550,17 +550,15 @@ public class IndelRealigner extends ReadWalker { } catch (Exception e) {} } - // We need to update the mapping quality score of the cleaned reads; - // however we don't have enough info to use the proper MAQ scoring system. - // For now, we'll use a heuristic: - // the mapping quality score is improved by the LOD difference in mismatching - // bases between the reference and alternate consensus (divided by 10) - // finish cleaning the appropriate reads for ( Pair indexPair : bestConsensus.readIndexes ) { final AlignedRead aRead = altReads.get(indexPair.first); if ( aRead.finalizeUpdate() ) { - aRead.getRead().setMappingQuality(Math.min(aRead.getRead().getMappingQuality() + (int)(improvement/10.0), 255)); + // We need to update the mapping quality score of the cleaned reads; + // however we don't have enough info to use the proper MAQ scoring system. + // For now, we will just arbitrarily add 10 to the mapping quality. [EB, 6/7/2010]. + // TODO -- we need a better solution here + aRead.getRead().setMappingQuality(Math.min(aRead.getRead().getMappingQuality() + 10, 254)); aRead.getRead().setAttribute("NM", AlignmentUtils.numMismatches(aRead.getRead(), reference, aRead.getRead().getAlignmentStart()-(int)leftmostIndex)); } } diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/indels/IndelRealignerIntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/indels/IndelRealignerIntegrationTest.java index 14a74d341..958004e84 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/indels/IndelRealignerIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/indels/IndelRealignerIntegrationTest.java @@ -9,7 +9,7 @@ public class IndelRealignerIntegrationTest extends WalkerTest { @Test public void testRealignerLod5() { - String[] md5s = {"56f1fb75cae706a5a6278257ea2f2598", "18fca887d1eb7dc300e717ae03b9da62"}; + String[] md5s = {"726c629a382e4da0dffd4de2e439aa91", "18fca887d1eb7dc300e717ae03b9da62"}; WalkerTestSpec spec = new WalkerTestSpec( "-T IndelRealigner -noPG -LOD 5 -maxConsensuses 100 -greedy 100 -R " + oneKGLocation + "reference/human_b36_both.fasta -I " + validationDataLocation + "NA12878.chrom1.SLX.SRP000032.2009_06.bam -L 1:10023000-10030000 -compress 1 -targetIntervals " + validationDataLocation + "cleaner.test.intervals -O %s -stats %s --sortInCoordinateOrderEvenThoughItIsHighlyUnsafe", 2, @@ -19,7 +19,7 @@ public class IndelRealignerIntegrationTest extends WalkerTest { @Test public void testRealignerLod50() { - String[] md5s = {"56f1fb75cae706a5a6278257ea2f2598", "9537e4f195ce5840136f60fb61201369"}; + String[] md5s = {"726c629a382e4da0dffd4de2e439aa91", "9537e4f195ce5840136f60fb61201369"}; WalkerTestSpec spec = new WalkerTestSpec( "-T IndelRealigner -noPG -LOD 50 -maxConsensuses 100 -greedy 100 -R " + oneKGLocation + "reference/human_b36_both.fasta -I " + validationDataLocation + "NA12878.chrom1.SLX.SRP000032.2009_06.bam -L 1:10023000-10030000 -compress 1 -targetIntervals " + validationDataLocation + "cleaner.test.intervals -O %s -stats %s --sortInCoordinateOrderEvenThoughItIsHighlyUnsafe", 2, @@ -29,7 +29,7 @@ public class IndelRealignerIntegrationTest extends WalkerTest { @Test public void testRealignerKnownsOnly() { - String[] md5s = {"54621fe4a53a559908ff20f6f0d0e758", "1091436c40d5ba557d85662999cc0c1d"}; + String[] md5s = {"d609430ffbc0fd8b68f383b9eec17e8b", "1091436c40d5ba557d85662999cc0c1d"}; WalkerTestSpec spec = new WalkerTestSpec( "-T IndelRealigner -noPG -LOD 1.0 -R " + oneKGLocation + "reference/human_b36_both.fasta -I " + validationDataLocation + "NA12878.chrom1.SLX.SRP000032.2009_06.bam -L 1:10023000-10076000 -compress 1 -targetIntervals " + validationDataLocation + "NA12878.indels.intervals -B knownIndels,VCF," + validationDataLocation + "NA12878.indels.vcf -O %s -stats %s --sortInCoordinateOrderEvenThoughItIsHighlyUnsafe -knownsOnly", 2,