From 46668d469a700afaa6f8448986a88516e0277594 Mon Sep 17 00:00:00 2001 From: Ron Levine Date: Mon, 16 Mar 2015 18:37:15 -0400 Subject: [PATCH] Exclude MappingQualityZero from default annotations --- .../walkers/annotator/MappingQualityZero.java | 4 +- .../haplotypecaller/HaplotypeCaller.java | 2 +- ...lexAndSymbolicVariantsIntegrationTest.java | 10 +- .../HaplotypeCallerGVCFIntegrationTest.java | 60 +++++------ .../HaplotypeCallerIntegrationTest.java | 99 ++++++++++--------- 5 files changed, 89 insertions(+), 86 deletions(-) diff --git a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/annotator/MappingQualityZero.java b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/annotator/MappingQualityZero.java index 57f42ef4b..b3027a695 100644 --- a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/annotator/MappingQualityZero.java +++ b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/annotator/MappingQualityZero.java @@ -104,7 +104,7 @@ public class MappingQualityZero extends InfoFieldAnnotation implements StandardA private Map annotatePileup(final ReferenceContext ref, final Map stratifiedContexts, final VariantContext vc) { - if ( stratifiedContexts.size() == 0 ) + if ( stratifiedContexts.isEmpty() ) return null; int mq0 = 0; @@ -123,7 +123,7 @@ public class MappingQualityZero extends InfoFieldAnnotation implements StandardA private Map annotateWithLikelihoods(final Map stratifiedPerReadAlleleLikelihoodMap, final VariantContext vc) { - if (stratifiedPerReadAlleleLikelihoodMap == null) + if ( stratifiedPerReadAlleleLikelihoodMap == null ) return null; int mq0 = 0; diff --git a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCaller.java b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCaller.java index f5537ee63..47c8cd78b 100644 --- a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCaller.java +++ b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCaller.java @@ -356,7 +356,7 @@ public class HaplotypeCaller extends ActiveRegionWalker, In */ @Advanced @Argument(fullName="excludeAnnotation", shortName="XA", doc="One or more specific annotations to exclude", required=false) - protected List annotationsToExclude = new ArrayList<>(Arrays.asList(new String[]{"SpanningDeletions", "TandemRepeatAnnotator"})); + protected List annotationsToExclude = new ArrayList<>(Arrays.asList(new String[]{"SpanningDeletions", "TandemRepeatAnnotator", "MappingQualityZero"})); /** * Which groups of annotations to add to the output VCF file. The single value 'none' removes the default group. See diff --git a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCallerComplexAndSymbolicVariantsIntegrationTest.java b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCallerComplexAndSymbolicVariantsIntegrationTest.java index 45c486d1e..d850191f0 100644 --- a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCallerComplexAndSymbolicVariantsIntegrationTest.java +++ b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCallerComplexAndSymbolicVariantsIntegrationTest.java @@ -72,7 +72,7 @@ public class HaplotypeCallerComplexAndSymbolicVariantsIntegrationTest extends Wa @Test public void testHaplotypeCallerMultiSampleComplex1() { - HCTestComplexVariants(privateTestDir + "AFR.complex.variants.bam", "", "dc7906ed73dc071162c98e4bbe77df44"); + HCTestComplexVariants(privateTestDir + "AFR.complex.variants.bam", "", "329e57675a6bab117597f02e3f109095"); } private void HCTestSymbolicVariants(String bam, String args, String md5) { @@ -84,7 +84,7 @@ public class HaplotypeCallerComplexAndSymbolicVariantsIntegrationTest extends Wa // TODO -- need a better symbolic allele test @Test public void testHaplotypeCallerSingleSampleSymbolic() { - HCTestSymbolicVariants(NA12878_CHR20_BAM, "", "845e795a345400a37c0dafdd5ce2f9ac"); + HCTestSymbolicVariants(NA12878_CHR20_BAM, "", "2bddd2bf5427142bf2235daa8589efee"); } private void HCTestComplexGGA(String bam, String args, String md5) { @@ -96,13 +96,13 @@ public class HaplotypeCallerComplexAndSymbolicVariantsIntegrationTest extends Wa @Test public void testHaplotypeCallerMultiSampleGGAComplex() { HCTestComplexGGA(NA12878_CHR20_BAM, "-L 20:119673-119823 -L 20:121408-121538", - "d27dba3772a68f254d00b247f09099ec"); + "4c12c04c34c782b25df78d37868e742d"); } @Test public void testHaplotypeCallerMultiSampleGGAMultiAllelic() { HCTestComplexGGA(NA12878_CHR20_BAM, "-L 20:133041-133161 -L 20:300207-300337", - "0eb6ce85c70b152062a5af63b6da3e8f"); + "c3fc8876b9b7247f68d758b8a9d60fe5"); } private void HCTestComplexConsensusMode(String bam, String args, String md5) { @@ -114,7 +114,7 @@ public class HaplotypeCallerComplexAndSymbolicVariantsIntegrationTest extends Wa @Test public void testHaplotypeCallerMultiSampleConsensusModeComplex() { HCTestComplexGGA(NA12878_CHR20_BAM, "-L 20:119673-119823 -L 20:121408-121538 -L 20:133041-133161 -L 20:300207-300337", - "523d3fb07b40d8c2637e82ba7a6e2a5b"); + "b6576ef09027cb22fa02efda67f7139d"); } } diff --git a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCallerGVCFIntegrationTest.java b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCallerGVCFIntegrationTest.java index d709b00d8..57fd97195 100644 --- a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCallerGVCFIntegrationTest.java +++ b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCallerGVCFIntegrationTest.java @@ -74,12 +74,12 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest { final String WExIntervals = "-L 20:10,000,000-10,100,000 -isr INTERSECTION -L " + hg19Chr20Intervals; // this functionality can be adapted to provide input data for whatever you might want in your data - tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "646ec07bd026da1e72b5e789f5aa3a3d"}); - tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.BP_RESOLUTION, PCRFreeIntervals, "cb598bee733db0461f6a24d265daed45"}); - tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.GVCF, PCRFreeIntervals, "c53ecb02a41511123dc4e1573dd516f6"}); - tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "9dbe7721ebfba9aefcfbfd1bdd62f2c4"}); - tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.BP_RESOLUTION, WExIntervals, "4c99694b14beffd694f9738697b8f9d5"}); - tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.GVCF, WExIntervals, "87d1e673e2512aefdceddd0293e4f346"}); + tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "6bfe8418aefa0d5d04bdc8f5f31bbb97"}); + tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.BP_RESOLUTION, PCRFreeIntervals, "8daf142d0f42967b9c59aae4580a18c5"}); + tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.GVCF, PCRFreeIntervals, "1ad6d0d5764e2bc0839af4b79f1bd351"}); + tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "00aa548e22334fc121f0c8bee2b05d7a"}); + tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.BP_RESOLUTION, WExIntervals, "2e64530bfc8cb0a3ad72cc5d11d4694b"}); + tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.GVCF, WExIntervals, "c236b1f6bfbbbc258d3077d75bb9e552"}); return tests.toArray(new Object[][]{}); } @@ -93,13 +93,13 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest { final String WExIntervals = "-L 20:10,000,000-10,100,000 -isr INTERSECTION -L " + hg19Chr20Intervals; // this functionality can be adapted to provide input data for whatever you might want in your data - tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "83b96e3e364821c51e6a2c2a64616b24"}); - tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.BP_RESOLUTION, PCRFreeIntervals, "f38178834961798d79e7190dbca004bf"}); - tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.GVCF, PCRFreeIntervals, "a6db14e73e0a270b9d3e2035acfc1d2f"}); - tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "afede7dbbcbe0e1af4abba7fc7bef479"}); - tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.BP_RESOLUTION, WExIntervals, "853bd2f47496b3e8d1fe85657e4bf812"}); + tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "58abeeaebe89fa5e65bae305f5325a13"}); + tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.BP_RESOLUTION, PCRFreeIntervals, "ba349abd7370252215ebf9e2f246283c"}); + tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.GVCF, PCRFreeIntervals, "c91ff30df7644c3fd5be1355533d9fef"}); + tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "04d025e1102bede70d0aa9dc25a89e01"}); + tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.BP_RESOLUTION, WExIntervals, "a1fcce758ed1bd8ead5030b598fd66eb"}); - final String NA12878bandedResolutionMD5 = "87900cbed775471f1a7ad6582b0581f9"; + final String NA12878bandedResolutionMD5 = "12ce2c83d71ad3db7269c22e65a47ffb"; tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.GVCF, WExIntervals, NA12878bandedResolutionMD5}); tests.add(new Object[]{NA12878_WEx + " -I " + privateTestDir + "NA20313.highCoverageRegion.bam -sn NA12878", ReferenceConfidenceMode.GVCF, WExIntervals, NA12878bandedResolutionMD5}); @@ -116,12 +116,12 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest { final String WExIntervals = "-L 20:10,000,000-10,100,000 -isr INTERSECTION -L " + hg19Chr20Intervals; // this functionality can be adapted to provide input data for whatever you might want in your data - tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "254b4bed7fc8ef5d3c4cb4ebf4ea73c2"}); - tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.BP_RESOLUTION, PCRFreeIntervals, "3f9e2b721c3bc8a6d76aa75bb7544f28"}); - tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.GVCF, PCRFreeIntervals, "bfd12d811446cde2466508033cae7122"}); - tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "8e35def5c821afa9b6fbeed0aed0a866"}); - tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.BP_RESOLUTION, WExIntervals, "8cebba1996a2aca29370c4d85f12128c"}); - tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.GVCF, WExIntervals, "8abc60102776b34e22858ca157c784a9"}); + tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "e85d74be34c91ab84ea1e6ab6276fbab"}); + tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.BP_RESOLUTION, PCRFreeIntervals, "10dd974f0fd83b8f187e1e9f39ba9237"}); + tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.GVCF, PCRFreeIntervals, "fc7ae67b25ff3e82062b80827bd30f6d"}); + tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "87a745384652813976ee37091be45a14"}); + tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.BP_RESOLUTION, WExIntervals, "a36a9f819e82f7ba6d77ab0b65475fbc"}); + tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.GVCF, WExIntervals, "bbd62dbeddfdc7353264870e4379cc04"}); return tests.toArray(new Object[][]{}); } @@ -134,19 +134,19 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest { final String WExIntervals = "-L 20:10,000,000-10,100,000 -isr INTERSECTION -L " + hg19Chr20Intervals; // this functionality can be adapted to provide input data for whatever you might want in your data - tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "d8daf60c68f39875680cc037f264ccc0"}); - tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.BP_RESOLUTION, PCRFreeIntervals, "dd1e6ee5e242fa1caa7f64a9605e4b16"}); - tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.GVCF, PCRFreeIntervals, "a040bb2ebacf5afab3490504730043a1"}); - tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "d5ed4c847250a1096b6a5a2eac61d8dc"}); - tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.BP_RESOLUTION, WExIntervals, "0d41cee1d7bd3c6df9816cc87a8a9d7c"}); - tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.GVCF, WExIntervals, "f8775dd95c3b185fc6abdb3ef8da3833"}); + tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "7f1b295150967269545096564d5ebcca"}); + tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.BP_RESOLUTION, PCRFreeIntervals, "97c5a77752305990420d5d725c70c2cd"}); + tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.GVCF, PCRFreeIntervals, "04b5f3f7a6d1c53beef14c8b295883b1"}); + tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "f0b3e472e175ffa4fdf4e04f88e0ade1"}); + tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.BP_RESOLUTION, WExIntervals, "747204e4bad4620c5298b683813c65ee"}); + tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.GVCF, WExIntervals, "5a2d32868f007d9d3537ee9d66bd6f38"}); return tests.toArray(new Object[][]{}); } /** - * Example testng test using MyDataProvider + * Test HaplotypeCaller, using MyDataProvider */ @Test(dataProvider = "MyDataProvider") public void testHCWithGVCF(String bam, ReferenceConfidenceMode mode, String intervals, String md5) { @@ -158,7 +158,7 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest { } /** - * Example testng test using MyDataProvider + * Test HaplotypeCaller with haploid samples, using MyDataProviderHaploid */ @Test(dataProvider = "MyDataProviderHaploid", enabled=true) public void testHCWithGVCFHaploid(final String bam, final ReferenceConfidenceMode mode, final String intervals, final String md5) { @@ -170,7 +170,7 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest { } /** - * Example testng test using MyDataProvider + * Test HaplotypeCaller with tetraploid samples, using MyDataProviderTetraploid */ @Test(dataProvider = "MyDataProviderTetraploid", enabled=true) public void testHCWithGVCFTetraploid(final String bam, final ReferenceConfidenceMode mode, final String intervals, final String md5) { @@ -182,7 +182,7 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest { } /** - * Example testng test using MyDataProvider + * Test HaplotypeCaller with manyploid samples, using MyDataProviderManyploid */ @Test(dataProvider = "MyDataProviderManyploid", enabled=true) public void testHCWithGVCFManyploid(final String bam, final ReferenceConfidenceMode mode, final String intervals, final String md5) { @@ -241,7 +241,7 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest { public void testWrongGVCFNonVariantRecordOrderBugFix() { final String commandLine = String.format("-T HaplotypeCaller --pcr_indel_model NONE -pairHMMSub %s %s -R %s -I %s -L %s -ERC GVCF --no_cmdline_in_header -variant_index_type %s -variant_index_parameter %d", HMM_SUB_IMPLEMENTATION, ALWAYS_LOAD_VECTOR_HMM, b37KGReference, WRONG_GVCF_RECORD_ORDER_BUGFIX_BAM, WRONG_GVCF_RECORD_ORDER_BUGFIX_INTERVALS, HaplotypeCaller.OPTIMAL_GVCF_INDEX_TYPE, HaplotypeCaller.OPTIMAL_GVCF_INDEX_PARAMETER); - final WalkerTestSpec spec = new WalkerTestSpec(commandLine + " -o %s", Arrays.asList("9961c55d50332b61c9084fae2b256856")); + final WalkerTestSpec spec = new WalkerTestSpec(commandLine + " -o %s", Arrays.asList("ae90a1b5c40f19df38e8ac58c3844ed5")); spec.disableShadowBCF(); executeTest("testMissingGVCFIndexingStrategyException", spec); } @@ -258,7 +258,7 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest { public void testNoCallGVCFMissingPLsBugFix() { final String commandLine = String.format("-T HaplotypeCaller --pcr_indel_model NONE -pairHMMSub %s %s -R %s -I %s -L %s -ERC GVCF --no_cmdline_in_header -variant_index_type %s -variant_index_parameter %d", HMM_SUB_IMPLEMENTATION, ALWAYS_LOAD_VECTOR_HMM, b37KGReference, NOCALL_GVCF_BUGFIX_BAM, NOCALL_GVCF_BUGFIX_INTERVALS, HaplotypeCaller.OPTIMAL_GVCF_INDEX_TYPE, HaplotypeCaller.OPTIMAL_GVCF_INDEX_PARAMETER); - final WalkerTestSpec spec = new WalkerTestSpec(commandLine + " -o %s", Arrays.asList("a376680db27c907c6acd0e07bbde8f92")); + final WalkerTestSpec spec = new WalkerTestSpec(commandLine + " -o %s", Arrays.asList("bf6325fbc06c80893f3170668cfbed06")); spec.disableShadowBCF(); executeTest("testNoCallGVCFMissingPLsBugFix", spec); } diff --git a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java index 899d23736..889e2d771 100644 --- a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java +++ b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java @@ -56,6 +56,8 @@ import htsjdk.tribble.readers.LineIterator; import htsjdk.tribble.readers.PositionalBufferedStream; import htsjdk.variant.variantcontext.VariantContext; import htsjdk.variant.vcf.VCFCodec; +import htsjdk.variant.vcf.VCFConstants; +import org.apache.commons.io.FileUtils; import org.broadinstitute.gatk.engine.walkers.WalkerTest; import org.broadinstitute.gatk.utils.GenomeLoc; import org.broadinstitute.gatk.utils.GenomeLocParser; @@ -85,95 +87,96 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { final static String HMM_SUB_IMPLEMENTATION = "UNVECTORIZED"; final static String ALWAYS_LOAD_VECTOR_HMM = "-alwaysloadVectorHMM"; - private void HCTest(String bam, String args, String md5) { + private void HCTest(String bam, String args, String md5) throws IOException { final String base = String.format("-T HaplotypeCaller --contamination_fraction_to_filter 0.05 --disableDithering --pcr_indel_model NONE --maxReadsInRegionPerSample 1000 --minReadsPerAlignmentStart 5 --maxProbPropagationDistance 50 --activeProbabilityThreshold 0.002 -pairHMMSub %s %s -R %s -I %s -L %s", HMM_SUB_IMPLEMENTATION, ALWAYS_LOAD_VECTOR_HMM, REF, bam, INTERVALS_FILE) + " --no_cmdline_in_header -o %s -minPruning 3"; final WalkerTestSpec spec = new WalkerTestSpec(base + " " + args, Arrays.asList(md5)); - executeTest("testHaplotypeCaller: args=" + args, spec); + final File outputVCF = executeTest("testHaplotypeCaller: args=" + args, spec).getFirst().get(0); + Assert.assertFalse(FileUtils.readFileToString(outputVCF).contains(VCFConstants.MAPPING_QUALITY_ZERO_KEY)); } @Test - public void testHaplotypeCallerMultiSample() { - HCTest(CEUTRIO_BAM, "", "9863e997c4f4be60e7e76a5573ec270f"); + public void testHaplotypeCallerMultiSample() throws IOException { + HCTest(CEUTRIO_BAM, "", "6d8a38310a086f4d80f25d2b80a309b2"); } @Test - public void testHaplotypeCallerSingleSample() { - HCTest(NA12878_BAM, "", "e85ada8486a4ed7231918187a100e1c3"); + public void testHaplotypeCallerSingleSample() throws IOException { + + HCTest(NA12878_BAM, "", "93990d0fed73087294548e71c4e661e9"); } @Test - public void testHaplotypeCallerMultiSampleHaploid() { - HCTest(CEUTRIO_BAM, - "-ploidy 1", "1adc1d54b9d0cd493d85c6406ae4d4a7"); + public void testHaplotypeCallerMultiSampleHaploid() throws IOException { + HCTest(CEUTRIO_BAM, "-ploidy 1", "deac83402aa9ef26fcc42e5ab08140d3"); } @Test - public void testHaplotypeCallerSingleSampleHaploid() { - HCTest(NA12878_BAM, "-ploidy 1", "e5c8a8bfb4d9d522e610a2299a9b32ad"); + public void testHaplotypeCallerSingleSampleHaploid() throws IOException { + HCTest(NA12878_BAM, "-ploidy 1", "633d7bd09d202b062854a647ec0f3ce0"); } @Test - public void testHaplotypeCallerSingleSampleTetraploid() { - HCTest(NA12878_BAM, "-ploidy 4", "af711f92b33d3f42e87a719745d93a68"); + public void testHaplotypeCallerSingleSampleTetraploid() throws IOException { + HCTest(NA12878_BAM, "-ploidy 4", "605498f14cb0b01695109035068a147e"); } @Test - public void testHaplotypeCallerMinBaseQuality() { - HCTest(NA12878_BAM, "-mbq 15", "e85ada8486a4ed7231918187a100e1c3"); + public void testHaplotypeCallerMinBaseQuality() throws IOException { + HCTest(NA12878_BAM, "-mbq 15", "93990d0fed73087294548e71c4e661e9"); } @Test - public void testHaplotypeCallerMinBaseQualityHaploid() { - HCTest(NA12878_BAM, "-mbq 15 -ploidy 1", "e5c8a8bfb4d9d522e610a2299a9b32ad"); + public void testHaplotypeCallerMinBaseQualityHaploid() throws IOException { + HCTest(NA12878_BAM, "-mbq 15 -ploidy 1", "633d7bd09d202b062854a647ec0f3ce0"); } @Test - public void testHaplotypeCallerMinBaseQualityTetraploid() { - HCTest(NA12878_BAM, "-mbq 15 -ploidy 4", "af711f92b33d3f42e87a719745d93a68"); + public void testHaplotypeCallerMinBaseQualityTetraploid() throws IOException { + HCTest(NA12878_BAM, "-mbq 15 -ploidy 4", "605498f14cb0b01695109035068a147e"); } @Test - public void testHaplotypeCallerGraphBasedSingleSample() { - HCTest(NA12878_BAM, "-likelihoodEngine GraphBased", "129965453a3ad9a22aa241f8c4afcbbf"); + public void testHaplotypeCallerGraphBasedSingleSample() throws IOException { + HCTest(NA12878_BAM, "-likelihoodEngine GraphBased", "1bd3336031e18c5f06abe760c33dd6be"); } @Test - public void testHaplotypeCallerGraphBasedMultiSampleHaploid() { - HCTest(CEUTRIO_BAM, "-likelihoodEngine GraphBased -ploidy 1", "1cf7e07f659c0aa462e17d2fe2981613"); + public void testHaplotypeCallerGraphBasedMultiSampleHaploid() throws IOException { + HCTest(CEUTRIO_BAM, "-likelihoodEngine GraphBased -ploidy 1", "e4a2b4c7adc7d45e2ad2bb61d263b9ac"); } @Test - public void testHaplotypeCallerGraphBasedMultiSample() { - HCTest(CEUTRIO_BAM, "-likelihoodEngine GraphBased", "4d8fdb7ae9dd599f8c9f54ae4484ef38"); + public void testHaplotypeCallerGraphBasedMultiSample() throws IOException { + HCTest(CEUTRIO_BAM, "-likelihoodEngine GraphBased", "dc757f57a6ddac88ddceab5be1533f89"); } @Test - public void testHaplotypeCallerSingleSampleWithDbsnp() { - HCTest(NA12878_BAM, "-D " + b37dbSNP132, "0f9f45384669cde243731ca803fa3a0b"); + public void testHaplotypeCallerSingleSampleWithDbsnp() throws IOException { + HCTest(NA12878_BAM, "-D " + b37dbSNP132, "c68a0659d6de9fb1c2f8e2db4da2f8a2"); } @Test - public void testHaplotypeCallerMultiSampleGGA() { + public void testHaplotypeCallerMultiSampleGGA() throws IOException { HCTest(CEUTRIO_BAM, "--max_alternate_alleles 3 -gt_mode GENOTYPE_GIVEN_ALLELES -alleles " + validationDataLocation + "combined.phase1.chr20.raw.indels.sites.vcf" + " -isr INTERSECTION -L " + GGA_INTERVALS_FILE, - "e9bc5ddd6e7e530268ffeee4c853f8f0"); + "469228219a10f003e558aae66a838e73"); } @Test - public void testHaplotypeCallerMultiSampleGGAHaploid() { + public void testHaplotypeCallerMultiSampleGGAHaploid() throws IOException { HCTest(CEUTRIO_BAM, "--max_alternate_alleles 3 -gt_mode GENOTYPE_GIVEN_ALLELES -ploidy 1 -alleles " + validationDataLocation + "combined.phase1.chr20.raw.indels.sites.vcf -isr INTERSECTION -L 20:10080000-10100000", - "5c619c63de7ecf35b29562cf155ff5a0"); + "535cde1cbefd5b90cae793cbbdce5893"); } @Test - public void testHaplotypeCallerMultiSampleGGATetraploid() { + public void testHaplotypeCallerMultiSampleGGATetraploid() throws IOException { HCTest(CEUTRIO_BAM, "--max_alternate_alleles 3 -gt_mode GENOTYPE_GIVEN_ALLELES -ploidy 4 -alleles " + validationDataLocation + "combined.phase1.chr20.raw.indels.sites.vcf -isr INTERSECTION -L 20:10080000-10100000", - "506f0b55414dbdb900c8705609f69d57"); + "d8705ab5f7d4532c2ff8063244a72788"); } @Test - public void testHaplotypeCallerInsertionOnEdgeOfContig() { - HCTest(CEUTRIO_MT_TEST_BAM, "-L MT:1-10", "455843da6331c282cb88943f25dafeec"); + public void testHaplotypeCallerInsertionOnEdgeOfContig() throws IOException { + HCTest(CEUTRIO_MT_TEST_BAM, "-L MT:1-10", "60e578f65ab2be60f31ee8395845607a"); } private void HCTestIndelQualityScores(String bam, String args, String md5) { @@ -184,7 +187,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { @Test public void testHaplotypeCallerSingleSampleIndelQualityScores() { - HCTestIndelQualityScores(NA12878_RECALIBRATED_BAM, "", "f2242d1696ef542196d363cf56159851"); + HCTestIndelQualityScores(NA12878_RECALIBRATED_BAM, "", "a139a6d01101064a4a093b24449d8b52"); } private void HCTestNearbySmallIntervals(String bam, String args, String md5) { @@ -221,7 +224,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { @Test public void testHaplotypeCallerNearbySmallIntervals() { - HCTestNearbySmallIntervals(NA12878_BAM, "", "e0794be1404bffd88738968e26b48cbb"); + HCTestNearbySmallIntervals(NA12878_BAM, "", "f6fe463f338f6c5133ba08f1d667c23e"); } // This problem bam came from a user on the forum and it spotted a problem where the ReadClipper @@ -231,14 +234,14 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { @Test public void HCTestProblematicReadsModifiedInActiveRegions() { final String base = String.format("-T HaplotypeCaller --disableDithering --pcr_indel_model NONE -pairHMMSub %s %s -R %s -I %s", HMM_SUB_IMPLEMENTATION, ALWAYS_LOAD_VECTOR_HMM, REF, privateTestDir + "haplotype-problem-4.bam") + " --no_cmdline_in_header -o %s -minPruning 3 -L 4:49139026-49139965"; - final WalkerTestSpec spec = new WalkerTestSpec(base, Arrays.asList("cf6fbb3636c52cd47dd14e0bd415a320")); + final WalkerTestSpec spec = new WalkerTestSpec(base, Arrays.asList("869e786baa1a72a08f0a3781804abb3e")); executeTest("HCTestProblematicReadsModifiedInActiveRegions: ", spec); } @Test public void HCTestStructuralIndels() { final String base = String.format("-T HaplotypeCaller --disableDithering --pcr_indel_model NONE -pairHMMSub %s %s -R %s -I %s", HMM_SUB_IMPLEMENTATION, ALWAYS_LOAD_VECTOR_HMM, REF, privateTestDir + "AFR.structural.indels.bam") + " --no_cmdline_in_header -o %s -minPruning 6 -L 20:8187565-8187800 -L 20:18670537-18670730"; - final WalkerTestSpec spec = new WalkerTestSpec(base, Arrays.asList("a145c3c0e99b278054a9960923da8aaa")); + final WalkerTestSpec spec = new WalkerTestSpec(base, Arrays.asList("1ca9a141cb65c6070a93d5a2c55a9b3b")); executeTest("HCTestStructuralIndels: ", spec); } @@ -293,7 +296,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { public void HCTestDBSNPAnnotationWGS() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T HaplotypeCaller --disableDithering --pcr_indel_model NONE -pairHMMSub " + HMM_SUB_IMPLEMENTATION + " " + ALWAYS_LOAD_VECTOR_HMM + " -R " + b37KGReference + " --no_cmdline_in_header -I " + NA12878_PCRFREE + " -o %s -L 20:10,090,000-10,100,000 -D " + b37dbSNP132, 1, - Arrays.asList("f0618b66e088b2d6fd831bb357de933c")); + Arrays.asList("2dc24f409ec1aa402ad892dffe317618")); executeTest("HC calling with dbSNP ID annotation on WGS intervals", spec); } @@ -302,7 +305,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T HaplotypeCaller --disableDithering --pcr_indel_model NONE -pairHMMSub " + HMM_SUB_IMPLEMENTATION + " " + ALWAYS_LOAD_VECTOR_HMM + " -R " + b37KGReference + " --no_cmdline_in_header -I " + NA12878_PCRFREE + " -o %s -L 20:10,100,000-11,000,000 -D " + b37dbSNP132 + " -L " + hg19Intervals + " -isr INTERSECTION", 1, - Arrays.asList("b279dfa0864495d0cbe45167c13d5a75")); + Arrays.asList("a2f40779558c1157353c6fcfd3783a76")); executeTest("HC calling with dbSNP ID annotation on WEx intervals", spec); } @@ -310,7 +313,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { public void HCTestDBSNPAnnotationWGSGraphBased() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T HaplotypeCaller -likelihoodEngine GraphBased --disableDithering --pcr_indel_model NONE -pairHMMSub " + HMM_SUB_IMPLEMENTATION + " " + ALWAYS_LOAD_VECTOR_HMM + " -R " + b37KGReference + " --no_cmdline_in_header -I " + NA12878_PCRFREE + " -o %s -L 20:10,090,000-10,100,000 -D " + b37dbSNP132, 1, - Arrays.asList("1b15b696671a9da000d5ec0372f939a2")); + Arrays.asList("9d7ab1c89cce238cff055dc5e9091fb1")); executeTest("HC calling with dbSNP ID annotation on WGS intervals", spec); } @@ -319,7 +322,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T HaplotypeCaller -likelihoodEngine GraphBased --disableDithering --pcr_indel_model NONE -pairHMMSub " + HMM_SUB_IMPLEMENTATION + " " + ALWAYS_LOAD_VECTOR_HMM + " -R " + b37KGReference + " --no_cmdline_in_header -I " + NA12878_PCRFREE + " -o %s -L 20:10,000,000-11,000,000 -D " + b37dbSNP132 + " -L " + hg19Intervals + " -isr INTERSECTION", 1, - Arrays.asList("e46d99fb778e2aff09ccbbc1bda2a1bf")); + Arrays.asList("b2240a53e441064a1a60e60de4ca49ad")); executeTest("HC calling with dbSNP ID annotation on WEx intervals", spec); } @@ -342,7 +345,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { public void HCTestAggressivePcrIndelModelWGS() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T HaplotypeCaller --disableDithering --pcr_indel_model AGGRESSIVE -pairHMMSub " + HMM_SUB_IMPLEMENTATION + " " + ALWAYS_LOAD_VECTOR_HMM + " -R " + b37KGReference + " --no_cmdline_in_header -I " + NA12878_BAM + " -o %s -L 20:10,270,000-10,300,000", 1, - Arrays.asList("32deea51cad0424bd8517fab3ad264ea")); + Arrays.asList("591f8f31524510ace882a860d6850871")); executeTest("HC calling with aggressive indel error modeling on WGS intervals", spec); } @@ -350,7 +353,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { public void HCTestConservativePcrIndelModelWGS() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T HaplotypeCaller --disableDithering --pcr_indel_model CONSERVATIVE -pairHMMSub " + HMM_SUB_IMPLEMENTATION + " " + ALWAYS_LOAD_VECTOR_HMM + " -R " + b37KGReference + " --no_cmdline_in_header -I " + NA12878_BAM + " -o %s -L 20:10,270,000-10,300,000", 1, - Arrays.asList("04863dcc6f924b294814c9ef05d79a87")); + Arrays.asList("038db1cf0dadfe746a14e05f5cf3bb8e")); executeTest("HC calling with conservative indel error modeling on WGS intervals", spec); } @@ -370,7 +373,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { public void testLackSensitivityDueToBadHaplotypeSelectionFix() { final String commandLine = String.format("-T HaplotypeCaller -pairHMMSub %s %s -R %s -I %s -L %s --no_cmdline_in_header --maxNumHaplotypesInPopulation 16", HMM_SUB_IMPLEMENTATION, ALWAYS_LOAD_VECTOR_HMM, b37KGReferenceWithDecoy, privateTestDir + "hc-lack-sensitivity.bam", privateTestDir + "hc-lack-sensitivity.interval_list"); - final WalkerTestSpec spec = new WalkerTestSpec(commandLine + " -o %s", Arrays.asList("9fa83f82ba63729edd8696e82bfeea49")); + final WalkerTestSpec spec = new WalkerTestSpec(commandLine + " -o %s", Arrays.asList("e6bc4d979ae90c35809a2030ad709b5e")); spec.disableShadowBCF(); executeTest("testLackSensitivityDueToBadHaplotypeSelectionFix", spec); } @@ -379,7 +382,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { public void testMissingKeyAlternativeHaplotypesBugFix() { final String commandLine = String.format("-T HaplotypeCaller -pairHMMSub %s %s -R %s -I %s -L %s --no_cmdline_in_header ", HMM_SUB_IMPLEMENTATION, ALWAYS_LOAD_VECTOR_HMM, b37KGReferenceWithDecoy, privateTestDir + "lost-alt-key-hap.bam", privateTestDir + "lost-alt-key-hap.interval_list"); - final WalkerTestSpec spec = new WalkerTestSpec(commandLine + " -o %s", Arrays.asList("423b70c151a5d0028e104aa3372b8783")); + final WalkerTestSpec spec = new WalkerTestSpec(commandLine + " -o %s", Arrays.asList("e8ef8b17a7561dd056805c15baec285e")); spec.disableShadowBCF(); executeTest("testMissingKeyAlternativeHaplotypesBugFix", spec); } @@ -402,7 +405,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { // but please make sure that both outputs get the same variant, // alleles all with DBSNP ids // We test here that change in active region size does not have an effect in placement of indels. - final String md5 = "8f572cfc1da9bdfc5e5725e092298ee6"; + final String md5 = "df27ceb13e6cda2c97cacd23608c2f7f"; final WalkerTestSpec shortSpec = new WalkerTestSpec(commandLineShortInterval + " -o %s",Arrays.asList(md5)); executeTest("testDifferentIndelLocationsDueToSWExactDoubleComparisonsFix::shortInterval",shortSpec); final WalkerTestSpec longSpec = new WalkerTestSpec(commandLineLongInterval + " -o %s",Arrays.asList(md5));