diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java index 275d2d708..8d29753ee 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java @@ -284,7 +284,7 @@ public class UnifiedGenotyper extends LocusWalker, Unif private static Set getSupportedHeaderStrings() { Set result = new HashSet(); result.add(new VCFFormatHeaderLine(VCFConstants.GENOTYPE_KEY, 1, VCFHeaderLineType.String, "Genotype")); - result.add(new VCFFormatHeaderLine(VCFConstants.GENOTYPE_QUALITY_KEY, 1, VCFHeaderLineType.Float, "Genotype Quality")); + result.add(new VCFFormatHeaderLine(VCFConstants.GENOTYPE_QUALITY_KEY, 1, VCFHeaderLineType.Integer, "Genotype Quality")); result.add(new VCFFormatHeaderLine(VCFConstants.DEPTH_KEY, 1, VCFHeaderLineType.Integer, "Approximate read depth (reads with MQ=255 or with bad mates are filtered)")); result.add(new VCFFormatHeaderLine(VCFConstants.PHRED_GENOTYPE_LIKELIHOODS_KEY, VCFHeaderLineCount.G, VCFHeaderLineType.Integer, "Normalized, Phred-scaled likelihoods for genotypes as defined in the VCF specification")); diff --git a/public/java/src/org/broadinstitute/sting/utils/variantcontext/Genotype.java b/public/java/src/org/broadinstitute/sting/utils/variantcontext/Genotype.java index 2daa820d6..d7b744c4c 100755 --- a/public/java/src/org/broadinstitute/sting/utils/variantcontext/Genotype.java +++ b/public/java/src/org/broadinstitute/sting/utils/variantcontext/Genotype.java @@ -205,6 +205,17 @@ public class Genotype implements Comparable { return (hasAttribute(VCFConstants.PHRED_GENOTYPE_LIKELIHOODS_KEY) && !getAttribute(VCFConstants.PHRED_GENOTYPE_LIKELIHOODS_KEY).equals(VCFConstants.MISSING_VALUE_v4)) || (hasAttribute(VCFConstants.GENOTYPE_LIKELIHOODS_KEY) && !getAttribute(VCFConstants.GENOTYPE_LIKELIHOODS_KEY).equals(VCFConstants.MISSING_VALUE_v4)); } + + /** + * Convenience function that returns a string representation of the PL field of this + * genotype, or . if none is available. + * + * @return + */ + public String getLikelihoodsString() { + GenotypeLikelihoods gl = getLikelihoods(); + return gl == null ? VCFConstants.MISSING_VALUE_v4 : gl.toString(); + } public GenotypeLikelihoods getLikelihoods() { GenotypeLikelihoods x = getLikelihoods(VCFConstants.PHRED_GENOTYPE_LIKELIHOODS_KEY, true); diff --git a/public/java/src/org/broadinstitute/sting/utils/variantcontext/VariantJEXLContext.java b/public/java/src/org/broadinstitute/sting/utils/variantcontext/VariantJEXLContext.java index ccce21f52..beaa6732a 100644 --- a/public/java/src/org/broadinstitute/sting/utils/variantcontext/VariantJEXLContext.java +++ b/public/java/src/org/broadinstitute/sting/utils/variantcontext/VariantJEXLContext.java @@ -192,7 +192,7 @@ class JEXLMap implements Map { infoMap.put("isHomRef", g.isHomRef() ? "1" : "0"); infoMap.put("isHet", g.isHet() ? "1" : "0"); infoMap.put("isHomVar", g.isHomVar() ? "1" : "0"); - infoMap.put(VCFConstants.GENOTYPE_QUALITY_KEY, new Double(g.getPhredScaledQual())); + infoMap.put(VCFConstants.GENOTYPE_QUALITY_KEY, g.getPhredScaledQual()); for ( Map.Entry e : g.getAttributes().entrySet() ) { if ( e.getValue() != null && !e.getValue().equals(VCFConstants.MISSING_VALUE_v4) ) infoMap.put(e.getKey(), e.getValue()); diff --git a/public/java/test/org/broadinstitute/sting/BaseTest.java b/public/java/test/org/broadinstitute/sting/BaseTest.java index 702489fe9..5977538c1 100755 --- a/public/java/test/org/broadinstitute/sting/BaseTest.java +++ b/public/java/test/org/broadinstitute/sting/BaseTest.java @@ -273,6 +273,11 @@ public abstract class BaseTest { assertEqualsDoubleSmart((double)(Double)actual, (double)expected); } + public static final void assertEqualsDoubleSmart(final Object actual, final Double expected, final double tolerance) { + Assert.assertTrue(actual instanceof Double); + assertEqualsDoubleSmart((double)(Double)actual, (double)expected, tolerance); + } + public static final void assertEqualsDoubleSmart(final double actual, final double expected) { assertEqualsDoubleSmart(actual, expected, DEFAULT_FLOAT_TOLERANCE); } diff --git a/public/java/test/org/broadinstitute/sting/MD5DB.java b/public/java/test/org/broadinstitute/sting/MD5DB.java index 52680a078..7c47e8306 100644 --- a/public/java/test/org/broadinstitute/sting/MD5DB.java +++ b/public/java/test/org/broadinstitute/sting/MD5DB.java @@ -243,8 +243,8 @@ public class MD5DB { System.out.printf("##### Test %s is going to fail #####%n", name); String pathToExpectedMD5File = getMD5FilePath(expectedMD5, "[No DB file found]"); String pathToFileMD5File = getMD5FilePath(filemd5sum, "[No DB file found]"); - BaseTest.log(String.format("expected %s at %s", expectedMD5, pathToExpectedMD5File)); - BaseTest.log(String.format("calculated %s at %s", filemd5sum, pathToFileMD5File)); + BaseTest.log(String.format("expected %s", expectedMD5)); + BaseTest.log(String.format("calculated %s", filemd5sum)); BaseTest.log(String.format("diff %s %s", pathToExpectedMD5File, pathToFileMD5File)); // inline differences diff --git a/public/java/test/org/broadinstitute/sting/WalkerTest.java b/public/java/test/org/broadinstitute/sting/WalkerTest.java index 22db19b2f..d5f5c04f5 100755 --- a/public/java/test/org/broadinstitute/sting/WalkerTest.java +++ b/public/java/test/org/broadinstitute/sting/WalkerTest.java @@ -44,6 +44,7 @@ import org.testng.Assert; import org.testng.annotations.BeforeMethod; import java.io.File; +import java.text.SimpleDateFormat; import java.util.*; public class WalkerTest extends BaseTest { diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorIntegrationTest.java index 16a9ae558..4d7c5ded8 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorIntegrationTest.java @@ -16,7 +16,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testHasAnnotsNotAsking1() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " --variant:VCF3 " + testDir + "vcfexample2.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1, - Arrays.asList("8a105fa5eebdfffe7326bc5b3d8ffd1c")); + Arrays.asList("5720826c2bf6cbc762e4a888ef58c3f2")); executeTest("test file has annotations, not asking for annotations, #1", spec); } @@ -24,7 +24,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testHasAnnotsNotAsking2() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " --variant:VCF3 " + testDir + "vcfexample3.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1, - Arrays.asList("964f1016ec9a3c55333f62dd834c14d6")); + Arrays.asList("088e5db7d8de6606cd562885fa47f3b2")); executeTest("test file has annotations, not asking for annotations, #2", spec); } @@ -32,7 +32,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testHasAnnotsAsking1() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -G Standard --variant:VCF3 " + testDir + "vcfexample2.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1, - Arrays.asList("21810e5b51a0431b510a8d7a73f8771b")); + Arrays.asList("37fd6826db907f80d4631bae1b629da4")); executeTest("test file has annotations, asking for annotations, #1", spec); } @@ -40,7 +40,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testHasAnnotsAsking2() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -G Standard --variant:VCF3 " + testDir + "vcfexample3.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1, - Arrays.asList("31263a127c606f72fb00fac69f0320a6")); + Arrays.asList("8a85c20b219a8bb286df3c9f4e1cdc8c")); executeTest("test file has annotations, asking for annotations, #2", spec); } @@ -48,7 +48,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testNoAnnotsNotAsking1() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " --variant:VCF3 " + testDir + "vcfexample2empty.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1, - Arrays.asList("42ccee09fa9f8c58f4a0d4f1139c094f")); + Arrays.asList("da446d3a3e9aefa7537b65b5adc3609b")); executeTest("test file doesn't have annotations, not asking for annotations, #1", spec); } @@ -58,7 +58,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { // they don't get reordered. It's a good test of the genotype ordering system. WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " --variant:VCF3 " + testDir + "vcfexample3empty.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1, - Arrays.asList("f2ddfa8105c290b1f34b7a261a02a1ac")); + Arrays.asList("04c71d90e3df9d519160636ceb0f02b9")); executeTest("test file doesn't have annotations, not asking for annotations, #2", spec); } @@ -66,7 +66,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testNoAnnotsAsking1() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -G Standard --variant:VCF3 " + testDir + "vcfexample2empty.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1, - Arrays.asList("bd367dbcbcc45cc43588e1d7309a7ad1")); + Arrays.asList("6d64723c808a3dd774ed06e228f9c63d")); executeTest("test file doesn't have annotations, asking for annotations, #1", spec); } @@ -74,7 +74,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testNoAnnotsAsking2() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -G Standard --variant:VCF3 " + testDir + "vcfexample3empty.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1, - Arrays.asList("7f200756227a1ee75f33c466955015c5")); + Arrays.asList("153a23b2fa4eb0ee288e4bb2f0fc4bf8")); executeTest("test file doesn't have annotations, asking for annotations, #2", spec); } @@ -82,7 +82,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testExcludeAnnotations() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -G Standard -XA FisherStrand -XA ReadPosRankSumTest --variant:VCF3 " + testDir + "vcfexample2empty.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1, - Arrays.asList("65dc85869239d52e3893e5ba47c1afac")); + Arrays.asList("a28a503ab204474ecee306c9eceb1060")); executeTest("test exclude annotations", spec); } @@ -98,7 +98,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testNoReads() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -G Standard --variant " + testDir + "vcfexample3empty.vcf -L " + testDir + "vcfexample3empty.vcf", 1, - Arrays.asList("920d796cfaa19c20153181d7be627435")); + Arrays.asList("ea6201db7c1fd5cb9cc3110a3396c646")); executeTest("not passing it any reads", spec); } @@ -106,7 +106,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testDBTagWithDbsnp() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " --dbsnp " + b36dbSNP129 + " -G Standard --variant " + testDir + "vcfexample3empty.vcf -L " + testDir + "vcfexample3empty.vcf", 1, - Arrays.asList("3a1e3ddd8c563a9de522c551e3d7e724")); + Arrays.asList("5103b9d9857530dc0ccdb8ca0a1db8c3")); executeTest("getting DB tag with dbSNP", spec); } @@ -114,7 +114,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testMultipleIdsWithDbsnp() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " --alwaysAppendDbsnpId --dbsnp " + b36dbSNP129 + " -G Standard --variant " + testDir + "vcfexample3withIDs.vcf -L " + testDir + "vcfexample3withIDs.vcf", 1, - Arrays.asList("06107c9dfefc1ab53e366d0f86502ff2")); + Arrays.asList("d519c21ab0ae901d39856fea7e0e9d83")); executeTest("adding multiple IDs with dbSNP", spec); } @@ -122,7 +122,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testDBTagWithHapMap() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " --comp:H3 " + testDir + "fakeHM3.vcf -G Standard --variant " + testDir + "vcfexample3empty.vcf -L " + testDir + "vcfexample3empty.vcf", 1, - Arrays.asList("fe1e76a7a0d95ee7c604194b165a640d")); + Arrays.asList("746f3a431c6491b85dd6fcf75065550f")); executeTest("getting DB tag with HM3", spec); } @@ -130,7 +130,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testNoQuals() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " --variant " + testDir + "noQual.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L " + testDir + "noQual.vcf -A QualByDepth", 1, - Arrays.asList("e531c9f90c17f0f859cd1ac851a8edd8")); + Arrays.asList("7ce09a89e72ee95f21313e496311068a")); executeTest("test file doesn't have QUALs", spec); } @@ -138,7 +138,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testUsingExpression() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " --resource:foo " + testDir + "targetAnnotations.vcf -G Standard --variant:VCF3 " + testDir + "vcfexample3empty.vcf -E foo.AF -L " + testDir + "vcfexample3empty.vcf", 1, - Arrays.asList("b5583188347922476e23080a265c214e")); + Arrays.asList("accce2796a967d05d756e1b5adecd6d2")); executeTest("using expression", spec); } @@ -146,7 +146,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testUsingExpressionWithID() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " --resource:foo " + testDir + "targetAnnotations.vcf -G Standard --variant:VCF3 " + testDir + "vcfexample3empty.vcf -E foo.ID -L " + testDir + "vcfexample3empty.vcf", 1, - Arrays.asList("bb6d9553d6954923cdef157753735b87")); + Arrays.asList("9a37502ab929ac3d5a829467f5612853")); executeTest("using expression with ID", spec); } @@ -168,7 +168,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { validationDataLocation + "1kg_exomes_unfiltered.AFR.unfiltered.vcf --snpEffFile " + validationDataLocation + "snpEff2.0.5.AFR.unfiltered.vcf -L 1:1-1,500,000 -L 2:232,325,429", 1, - Arrays.asList("ffbda45b3682c9b83cb541d83f6c15d6") + Arrays.asList("bef7201d9c79facbecba15d4abcc684b") ); executeTest("Testing SnpEff annotations", spec); } @@ -187,7 +187,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { @Test public void testTDTAnnotation() { - final String MD5 = "a78c1e950740d3c13c0258960c5fa8e1"; + final String MD5 = "900e9d82ea3127aa06e676cf50b341f6"; WalkerTestSpec spec = new WalkerTestSpec( "-T VariantAnnotator -R " + b37KGReference + " -A TransmissionDisequilibriumTest --variant:vcf " + testDir + "ug.random50000.subset300bp.chr1.family.vcf" + " -L " + testDir + "ug.random50000.subset300bp.chr1.family.vcf --no_cmdline_in_header -ped " + testDir + "ug.random50000.family.ped -o %s", 1, @@ -198,7 +198,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { @Test public void testChromosomeCountsPed() { - final String MD5 = "32df3ceb63c277df442ed55fb8684933"; + final String MD5 = "7fe0e9df2d9fb375beb7cf23afdb4c87"; WalkerTestSpec spec = new WalkerTestSpec( "-T VariantAnnotator -R " + b37KGReference + " -A ChromosomeCounts --variant:vcf " + testDir + "ug.random50000.subset300bp.chr1.family.vcf" + " -L " + testDir + "ug.random50000.subset300bp.chr1.family.vcf --no_cmdline_in_header -ped " + testDir + "ug.random50000.family.ped -o %s", 1, @@ -208,7 +208,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { @Test public void testInbreedingCoeffPed() { - final String MD5 = "7f1314fada5cb1f35ba1996f8a7a686b"; + final String MD5 = "7aaf0033a823bbf9066b43764d8dd660"; WalkerTestSpec spec = new WalkerTestSpec( "-T VariantAnnotator -R " + b37KGReference + " -A InbreedingCoeff --variant:vcf " + testDir + "ug.random50000.subset300bp.chr1.family.vcf" + " -L " + testDir + "ug.random50000.subset300bp.chr1.family.vcf --no_cmdline_in_header -ped " + testDir + "ug.random50000.family.ped -o %s", 1, diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/beagle/BeagleIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/beagle/BeagleIntegrationTest.java index bf2f6fb3d..3f0d871b0 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/beagle/BeagleIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/beagle/BeagleIntegrationTest.java @@ -72,7 +72,7 @@ public class BeagleIntegrationTest extends WalkerTest { "--beagleR2:beagle /humgen/gsa-hpprojects/GATK/data/Validation_Data/EUR_beagle_in_test.r2 "+ "--beagleProbs:beagle /humgen/gsa-hpprojects/GATK/data/Validation_Data/EUR_beagle_in_test.gprobs.bgl "+ "--beaglePhased:beagle /humgen/gsa-hpprojects/GATK/data/Validation_Data/EUR_beagle_in_test.phased.bgl "+ - "-L 20:1-70000 -o %s --no_cmdline_in_header ",1,Arrays.asList("ddbf490f1d9f37cc79fe414c8d40886f")); + "-L 20:1-70000 -o %s --no_cmdline_in_header ",1,Arrays.asList("43865f3f0d975ee2c5912b31393842f8")); executeTest("testBeagleChangesSitesToRef",spec); } diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationIntegrationTest.java index c9a6dd0c6..719ec94cf 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationIntegrationTest.java @@ -16,7 +16,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testNoAction() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " --variant:VCF3 " + testDir + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("8a105fa5eebdfffe7326bc5b3d8ffd1c")); + Arrays.asList("5720826c2bf6cbc762e4a888ef58c3f2")); executeTest("test no action", spec); } @@ -24,7 +24,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testClusteredSnps() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -window 10 --variant:VCF3 " + testDir + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("27b13f179bb4920615dff3a32730d845")); + Arrays.asList("d7c2a4b0c1b2b982847508997ba57ebf")); executeTest("test clustered SNPs", spec); } @@ -32,7 +32,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testMask1() { WalkerTestSpec spec1 = new WalkerTestSpec( baseTestString() + " -maskName foo --mask:VCF3 " + testDir + "vcfexample2.vcf --variant:VCF3 " + testDir + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("578f9e774784c25871678e6464fd212b")); + Arrays.asList("890774962576c407d8a17ed57cf704c1")); executeTest("test mask all", spec1); } @@ -40,7 +40,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testMask2() { WalkerTestSpec spec2 = new WalkerTestSpec( baseTestString() + " -maskName foo --mask:VCF " + testDir + "vcfMask.vcf --variant:VCF3 " + testDir + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("bfa86a674aefca1b13d341cb14ab3c4f")); + Arrays.asList("8864573dbf52908501140e6b0afcbc90")); executeTest("test mask some", spec2); } @@ -48,7 +48,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testMask3() { WalkerTestSpec spec3 = new WalkerTestSpec( baseTestString() + " -maskName foo -maskExtend 10 --mask:VCF " + testDir + "vcfMask.vcf --variant:VCF3 " + testDir + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("5939f80d14b32d88587373532d7b90e5")); + Arrays.asList("42a1c08763f151073a49e3c7bb68028b")); executeTest("test mask extend", spec3); } @@ -56,7 +56,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testFilter1() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -filter 'DoC < 20 || FisherStrand > 20.0' -filterName foo --variant:VCF3 " + testDir + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("45219dbcfb6f81bba2ea0c35f5bfd368")); + Arrays.asList("ef8100c3b7c67d28571cbda771c414c2")); executeTest("test filter #1", spec); } @@ -64,7 +64,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testFilter2() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -filter 'AlleleBalance < 70.0 && FisherStrand == 1.4' -filterName bar --variant:VCF3 " + testDir + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("c95845e817da7352b9b72bc9794f18fb")); + Arrays.asList("318ed3874fd42b7da8c59554a25a1fab")); executeTest("test filter #2", spec); } @@ -72,7 +72,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testFilterWithSeparateNames() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " --filterName ABF -filter 'AlleleBalance < 0.7' --filterName FSF -filter 'FisherStrand == 1.4' --variant:VCF3 " + testDir + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("b8cdd7f44ff1a395e0a9b06a87e1e530")); + Arrays.asList("9cb398e78a38a7bc5e839e28c8dae2eb")); executeTest("test filter with separate names #2", spec); } @@ -80,7 +80,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testGenotypeFilters1() { WalkerTestSpec spec1 = new WalkerTestSpec( baseTestString() + " -G_filter 'GQ == 0.60' -G_filterName foo --variant:VCF3 " + testDir + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("96b61e4543a73fe725e433f007260039")); + Arrays.asList("b38709f932b969e4267603333863269e")); executeTest("test genotype filter #1", spec1); } @@ -88,7 +88,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testGenotypeFilters2() { WalkerTestSpec spec2 = new WalkerTestSpec( baseTestString() + " -G_filter 'AF == 0.04 && isHomVar == 1' -G_filterName foo --variant:VCF3 " + testDir + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("6c8112ab17ce39c8022c891ae73bf38e")); + Arrays.asList("0e1457e678326e44e92ee13e84414e0f")); executeTest("test genotype filter #2", spec2); } diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java index 471c858ca..da2aa9003 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java @@ -7,7 +7,6 @@ import org.testng.annotations.Test; import java.io.File; import java.util.Arrays; -import java.util.HashMap; import java.util.List; import java.util.Map; @@ -30,7 +29,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testMultiSamplePilot1() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( baseCommand + " -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -o %s -L 1:10,022,000-10,025,000", 1, - Arrays.asList("0357f708cf93decd4fc2e66b59109fe1")); + Arrays.asList("bf5c76bec6e00199d441b6175b6b7c39")); executeTest("test MultiSample Pilot1", spec); } @@ -38,7 +37,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testWithAllelesPassedIn1() { WalkerTest.WalkerTestSpec spec1 = new WalkerTest.WalkerTestSpec( baseCommand + " --genotyping_mode GENOTYPE_GIVEN_ALLELES -alleles " + testDir + "allelesForUG.vcf -I " + validationDataLocation + "pilot2_daughters.chr20.10k-11k.bam -o %s -L 20:10,000,000-10,025,000", 1, - Arrays.asList("b491ca7b74bbd010d3f3b3d571e3abf3")); + Arrays.asList("9f56f8d62c047213c894c3f250706aea")); executeTest("test MultiSample Pilot2 with alleles passed in", spec1); } @@ -46,7 +45,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testWithAllelesPassedIn2() { WalkerTest.WalkerTestSpec spec2 = new WalkerTest.WalkerTestSpec( baseCommand + " --output_mode EMIT_ALL_SITES --genotyping_mode GENOTYPE_GIVEN_ALLELES -alleles " + testDir + "allelesForUG.vcf -I " + validationDataLocation + "pilot2_daughters.chr20.10k-11k.bam -o %s -L 20:10,000,000-10,025,000", 1, - Arrays.asList("981b8e3fef61a00c4df49e6429723e48")); + Arrays.asList("0a5048062cd9022b761ae87efed5957e")); executeTest("test MultiSample Pilot2 with alleles passed in and emitting all sites", spec2); } @@ -54,7 +53,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testSingleSamplePilot2() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,100,000", 1, - Arrays.asList("f178609d30230bbd3c0a4173f81c8d98")); + Arrays.asList("f50a30bf9bbd4e5dcd5d7d9282b6dadf")); executeTest("test SingleSample Pilot2", spec); } @@ -62,7 +61,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testMultipleSNPAlleles() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T UnifiedGenotyper -R " + b37KGReference + " -nosl --no_cmdline_in_header -glm BOTH --dbsnp " + b37dbSNP129 + " -I " + testDir + "multiallelic.snps.bam -o %s -L " + testDir + "multiallelic.snps.intervals", 1, - Arrays.asList("b4fd4daaa39373a4cc2ccca5320b4543")); + Arrays.asList("6fb6ea5f2b9da02a0fea7cb2994fb5db")); executeTest("test Multiple SNP alleles", spec); } @@ -70,7 +69,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testBadRead() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T UnifiedGenotyper -R " + b37KGReference + " -nosl --no_cmdline_in_header -glm BOTH -I " + testDir + "badRead.test.bam -o %s -L 1:22753424-22753464", 1, - Arrays.asList("5eddd74df06bc5e9a5a629e039e03133")); + Arrays.asList("95158fb50db5d41a678cd331a3ffe5e1")); executeTest("test bad read", spec); } @@ -78,7 +77,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testReverseTrim() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T UnifiedGenotyper -R " + b37KGReference + " -nosl --no_cmdline_in_header -glm INDEL -I " + validationDataLocation + "CEUTrio.HiSeq.b37.chr20.10_11mb.bam -o %s -L 20:10289124 -L 20:10090289", 1, - Arrays.asList("2695becb936f7fd680b067135c2cd2fc")); + Arrays.asList("c86e05f315a86bc190d72cde911e6fe2")); executeTest("test reverse trim", spec); } @@ -88,7 +87,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { // // -------------------------------------------------------------------------------------------------------------- - private final static String COMPRESSED_OUTPUT_MD5 = "0847bf352193e8ff52e3182e3f97db63"; + private final static String COMPRESSED_OUTPUT_MD5 = "f6d655714706b6e8390037db3fad60ef"; @Test public void testCompressedOutput() { @@ -109,7 +108,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { // Note that we need to turn off any randomization for this to work, so no downsampling and no annotations - String md5 = "06d11ed89f02f08911e100df0f7db7a4"; + String md5 = "7bc812cc553b4ab77c08049f0e32d0f6"; WalkerTest.WalkerTestSpec spec1 = new WalkerTest.WalkerTestSpec( baseCommand + " -dt NONE -G none -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,075,000", 1, @@ -141,7 +140,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testMinBaseQualityScore() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000 --min_base_quality_score 26", 1, - Arrays.asList("d448aaa498337c9b15472aaa8137a98c")); + Arrays.asList("dfeaccb68165fdaffafde9150914432d")); executeTest("test min_base_quality_score 26", spec); } @@ -149,7 +148,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testSLOD() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T UnifiedGenotyper -R " + b36KGReference + " --no_cmdline_in_header -glm BOTH --dbsnp " + b36dbSNP129 + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000", 1, - Arrays.asList("75250c65647acabcd0319820d67deffe")); + Arrays.asList("35ef19b4f248969c74da8bd7489385d6")); executeTest("test SLOD", spec); } @@ -157,7 +156,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testNDA() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( baseCommand + " --annotateNDA -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000", 1, - Arrays.asList("70d54bc2170f00ca1ddee45141a6a7e2")); + Arrays.asList("aa49989fde8c6378f5c751f8b267c471")); executeTest("test NDA", spec); } @@ -165,30 +164,37 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testCompTrack() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T UnifiedGenotyper -R " + b36KGReference + " --no_cmdline_in_header -glm BOTH -comp:FOO " + b36dbSNP129 + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000", 1, - Arrays.asList("284d23c211f60dfac994e319caef0c36")); + Arrays.asList("ffaeb60a5776d85b41c64786ddc4d14d")); executeTest("test using comp track", spec); } @Test - public void testOutputParameter() { - HashMap e = new HashMap(); - e.put( "-sites_only", "aed7ab38d4381e5e5eeee9f73bf4fd81" ); - e.put( "--output_mode EMIT_ALL_CONFIDENT_SITES", "dd956beb4bb377a9b28e5da78df5f2f3" ); - e.put( "--output_mode EMIT_ALL_SITES", "a088df1f161f732ff148bd7a48894251" ); + public void testOutputParameterSitesOnly() { + testOutputParameters("-sites_only", "f9a4005c53291170800e6023503d5635"); + } - for ( Map.Entry entry : e.entrySet() ) { - WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( - baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000 " + entry.getKey(), 1, - Arrays.asList(entry.getValue())); - executeTest(String.format("testParameter[%s]", entry.getKey()), spec); - } + @Test + public void testOutputParameterAllConfident() { + testOutputParameters("--output_mode EMIT_ALL_CONFIDENT_SITES", "e6c63baff51aaeb318c8bebaf2989828"); + } + + @Test + public void testOutputParameterAllSites() { + testOutputParameters("--output_mode EMIT_ALL_SITES", "43ffa34646d781a368ea81342c21ae2e"); + } + + private void testOutputParameters(final String args, final String md5) { + WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( + baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000 " + args, 1, + Arrays.asList(md5)); + executeTest(String.format("testParameter[%s]", args), spec); } @Test public void testConfidence() { WalkerTest.WalkerTestSpec spec1 = new WalkerTest.WalkerTestSpec( baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000 -stand_call_conf 10 ", 1, - Arrays.asList("594e770c852a7e4a1dc2c4ab0065bebc")); + Arrays.asList("c7cb29121eb30e752ab6652a6d2a62a6")); executeTest("test confidence 1", spec1); } @@ -196,7 +202,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testConfidence2() { WalkerTest.WalkerTestSpec spec2 = new WalkerTest.WalkerTestSpec( baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000 -stand_emit_conf 10 ", 1, - Arrays.asList("ae52ac5a2c4515935294cddb5eadb255")); + Arrays.asList("e7bdb76be82420a03ff28038d283822d")); executeTest("test confidence 2", spec2); } @@ -206,17 +212,20 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { // // -------------------------------------------------------------------------------------------------------------- @Test - public void testHeterozyosity() { - HashMap e = new HashMap(); - e.put( 0.01, "fc1e160034b2beaa06f4edac06568d66" ); - e.put( 1.0 / 1850, "a64c9c16b22765edcfac261fd50b84e8" ); + public void testHeterozyosity1() { + testHeterozosity( 0.01, "ca65e199e9ff0bc986df3dee74e11eb1" ); + } - for ( Map.Entry entry : e.entrySet() ) { - WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( - baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,100,000 --heterozygosity " + entry.getKey(), 1, - Arrays.asList(entry.getValue())); - executeTest(String.format("test heterozyosity[%s]", entry.getKey()), spec); - } + @Test + public void testHeterozyosity2() { + testHeterozosity( 1.0 / 1850, "ddcdfe4a5252da59278a6f1ba6f8a175" ); + } + + private void testHeterozosity(final double arg, final String md5) { + WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( + baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,100,000 --heterozygosity " + arg, 1, + Arrays.asList(md5)); + executeTest(String.format("test heterozyosity[%s]", arg), spec); } @@ -233,7 +242,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { " -o %s" + " -L 1:10,000,000-10,100,000", 1, - Arrays.asList("db679044c22744067303939fef51a9d1")); + Arrays.asList("c4b3876d76e3d0fb78a1d3ebd674f1a1")); executeTest(String.format("test multiple technologies"), spec); } @@ -252,7 +261,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { " -L 1:10,000,000-10,100,000" + " -baq CALCULATE_AS_NECESSARY", 1, - Arrays.asList("ebd30ec778fbaf228458ac4a83210677")); + Arrays.asList("41445b1cd1a82af71126ff1692f7a5fe")); executeTest(String.format("test calling with BAQ"), spec); } @@ -271,7 +280,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { " -o %s" + " -L 1:10,000,000-10,500,000", 1, - Arrays.asList("b3277e20f2368c2669ac5be46fafe513")); + Arrays.asList("c9e79470a4ce6eacde366e9fcf4d5b14")); executeTest(String.format("test indel caller in SLX"), spec); } @@ -286,7 +295,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { " -minIndelCnt 1" + " -L 1:10,000,000-10,100,000", 1, - Arrays.asList("a67a040314113f649e3c2ffde326de4c")); + Arrays.asList("70f8a17ba68131520db5c764ac5acdd2")); executeTest(String.format("test indel caller in SLX with low min allele count"), spec); } @@ -299,7 +308,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { " -o %s" + " -L 1:10,000,000-10,500,000", 1, - Arrays.asList("fa5b909790faaac329f2b6a19db6d628")); + Arrays.asList("e4316d80fd833886820c8b4e122fbfc4")); executeTest(String.format("test indel calling, multiple technologies"), spec); } @@ -309,7 +318,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( baseCommandIndels + " --genotyping_mode GENOTYPE_GIVEN_ALLELES -alleles " + testDir + "indelAllelesForUG.vcf -I " + validationDataLocation + "pilot2_daughters.chr20.10k-11k.bam -o %s -L 20:10,000,000-10,100,000", 1, - Arrays.asList("c144a3a4d72cd281941ebf5e07d090f5")); + Arrays.asList("c92aba3635f3331ddf8ae7a0382ca594")); executeTest("test MultiSample Pilot2 indels with alleles passed in", spec); } @@ -319,21 +328,21 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { baseCommandIndels + " --output_mode EMIT_ALL_SITES --genotyping_mode GENOTYPE_GIVEN_ALLELES -alleles " + testDir + "indelAllelesForUG.vcf -I " + validationDataLocation + "pilot2_daughters.chr20.10k-11k.bam -o %s -L 20:10,000,000-10,100,000", 1, - Arrays.asList("af32437ec0ac6ea3b57196d163cac76e")); + Arrays.asList("b87034f349887160ec1124e12863d543")); executeTest("test MultiSample Pilot2 indels with alleles passed in and emitting all sites", spec); } @Test - public void testMultiSampleIndels() { + public void testMultiSampleIndels1() { WalkerTest.WalkerTestSpec spec1 = new WalkerTest.WalkerTestSpec( baseCommandIndels + " -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -o %s -L 1:10450700-10551000", 1, - Arrays.asList("bce73149ce104fe91ff8e43db7faf27a")); + Arrays.asList("51e6a7868d2ea2daefa411ed82f18be2")); List result = executeTest("test MultiSample Pilot1 CEU indels", spec1).getFirst(); WalkerTest.WalkerTestSpec spec2 = new WalkerTest.WalkerTestSpec( baseCommandIndels + " --genotyping_mode GENOTYPE_GIVEN_ALLELES -alleles " + result.get(0).getAbsolutePath() + " -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -o %s -L 1:10450700-10551000", 1, - Arrays.asList("822c7ed862a932deb59b16857e043404")); + Arrays.asList("954c52be0c6ca9ed5a213a53f4efbc10")); executeTest("test MultiSample Pilot1 CEU indels using GENOTYPE_GIVEN_ALLELES", spec2); } @@ -343,7 +352,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( baseCommandIndelsb37 + " --genotyping_mode GENOTYPE_GIVEN_ALLELES -out_mode EMIT_ALL_SITES -alleles " + testDir + vcf + " -I " + validationDataLocation + "NA12878.HiSeq.WGS.bwa.cleaned.recal.hg19.20.bam -o %s -L " + validationDataLocation + vcf, 1, - Arrays.asList("c56155e08b1264f289ed0c47d16a6cb4")); + Arrays.asList("ae44230ed54fd8ce63711cae908470cb")); executeTest("test GENOTYPE_GIVEN_ALLELES with no evidence in reads", spec); } @@ -376,7 +385,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testMinIndelFraction0() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( assessMinIndelFraction + " -minIndelFrac 0.0", 1, - Arrays.asList("f4783e6ba325500466a9f6ca9b7a4a7c")); + Arrays.asList("471012c1d3dbec4633710264de5daa24")); executeTest("test minIndelFraction 0.0", spec); } @@ -384,7 +393,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testMinIndelFraction25() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( assessMinIndelFraction + " -minIndelFrac 0.25", 1, - Arrays.asList("c0551a6a3d3eb598d2b35866e396e836")); + Arrays.asList("9165507fb202d515512a947a8a9db6bb")); executeTest("test minIndelFraction 0.25", spec); } @@ -392,7 +401,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testMinIndelFraction100() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( assessMinIndelFraction + " -minIndelFrac 1", 1, - Arrays.asList("306296493ba67e425250f31606210806")); + Arrays.asList("c1bbd4998b7c6dffee1682d3e5c929cc")); executeTest("test minIndelFraction 1.0", spec); } } diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/phasing/PhaseByTransmissionIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/phasing/PhaseByTransmissionIntegrationTest.java index fe132205d..e1b2212d6 100644 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/phasing/PhaseByTransmissionIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/phasing/PhaseByTransmissionIntegrationTest.java @@ -86,7 +86,7 @@ public class PhaseByTransmissionIntegrationTest extends WalkerTest { "-o %s" ), 2, - Arrays.asList("e3c572f933a40e1878a2cfa52049517a","60e4f0be344fb944ab3378f9ab27da64") + Arrays.asList("e3c572f933a40e1878a2cfa52049517a","0de6cccfec929caa07cd0eeafacbfffd") ); executeTest("testSpecialCases", spec); } diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/phasing/ReadBackedPhasingIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/phasing/ReadBackedPhasingIntegrationTest.java index 4e515688a..e123587dd 100644 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/phasing/ReadBackedPhasingIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/phasing/ReadBackedPhasingIntegrationTest.java @@ -26,7 +26,7 @@ public class ReadBackedPhasingIntegrationTest extends WalkerTest { baseTestString(hg18Reference, "phasing_test_chr20_332341_1332503.bam", "phasing_test_chr20_332341_1332503.vcf", 20000, 10, 10) + " -L chr20:332341-382503", 1, - Arrays.asList("9568ba0b6624b97ac55a59bdee2d9150")); + Arrays.asList("2520f93505fda28d44f618a0123d593b")); executeTest("MAX 10 het sites [TEST ONE]; require PQ >= 10", spec); } @@ -36,7 +36,7 @@ public class ReadBackedPhasingIntegrationTest extends WalkerTest { baseTestString(hg18Reference, "phasing_test_chr20_332341_1332503.bam", "phasing_test_chr20_332341_1332503.vcf", 20000, 10, 10) + " -L chr20:1232503-1332503", 1, - Arrays.asList("ce65194c24fe83b0ec90faa6c8e6109a")); + Arrays.asList("965b8f448365b7f4a124d32e809eb048")); executeTest("MAX 10 het sites [TEST TWO]; require PQ >= 10", spec); } @@ -46,7 +46,7 @@ public class ReadBackedPhasingIntegrationTest extends WalkerTest { baseTestString(hg18Reference, "phasing_test_chr20_332341_1332503.bam", "phasing_test_chr20_332341_1332503.vcf", 20000, 2, 30) + " -L chr20:332341-382503", 1, - Arrays.asList("02d134fd544613b1e5dd7f7197fc3753")); + Arrays.asList("60f5bb699335f47cdc505322c5be3803")); executeTest("MAX 2 het sites [TEST THREE]; require PQ >= 30", spec); } @@ -56,7 +56,7 @@ public class ReadBackedPhasingIntegrationTest extends WalkerTest { baseTestString(hg18Reference, "phasing_test_chr20_332341_1332503.bam", "phasing_test_chr20_332341_1332503.vcf", 20000, 5, 100) + " -L chr20:332341-382503", 1, - Arrays.asList("2f7ec9904fc054c2ba1a7db05eb29334")); + Arrays.asList("023c2fb43b50807cfd46841ed6f0d215")); executeTest("MAX 5 het sites [TEST FOUR]; require PQ >= 100", spec); } @@ -66,7 +66,7 @@ public class ReadBackedPhasingIntegrationTest extends WalkerTest { baseTestString(hg18Reference, "phasing_test_chr20_332341_1332503.bam", "phasing_test_chr20_332341_1332503.vcf", 1000, 7, 10) + " -L chr20:332341-482503", 1, - Arrays.asList("da7a31725f229d1782dd3049848730aa")); + Arrays.asList("e5e6e9f84d108d5b001aa53017d2801e")); executeTest("MAX 7 het sites [TEST FIVE]; require PQ >= 10; cacheWindow = 1000", spec); } @@ -76,7 +76,7 @@ public class ReadBackedPhasingIntegrationTest extends WalkerTest { baseTestString(hg18Reference, "phasing_test_chr20_332341_1332503.bam", "phasing_test_chr20_332341_1332503.vcf", 20000, 10, 10) + " -L chr20:652810-681757", 1, - Arrays.asList("e9d35cb88089fb0e8ae6678bfaeeac8c")); + Arrays.asList("8fc53bfbea2754ff8577460786a3400c")); executeTest("MAX 10 het sites [TEST SIX]; require PQ >= 10; cacheWindow = 20000; has inconsistent sites", spec); } diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/CombineVariantsIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/CombineVariantsIntegrationTest.java index 4b53ae4f7..49c47dc75 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/CombineVariantsIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/CombineVariantsIntegrationTest.java @@ -86,7 +86,7 @@ public class CombineVariantsIntegrationTest extends WalkerTest { @Test public void test1Indel1() { test1InOut("CEU.dindel.vcf4.trio.2010_06.indel.genotypes.vcf", "074e909f80ffcc9fddc3fac89ea36bef"); } @Test public void test1Indel2() { test1InOut("CEU.dindel.vcf4.low_coverage.2010_06.indel.genotypes.vcf", "f26980af214011c0452b8ce843f3063b"); } - @Test public void combineWithPLs() { combinePLs("combine.3.vcf", "combine.4.vcf", "7c337c8752abeffb0c9a4ee35d1a1451"); } + @Test public void combineWithPLs() { combinePLs("combine.3.vcf", "combine.4.vcf", "5bc1de1197506aced0f9e7a08b572c44"); } @Test public void combineTrioCalls() { combine2("CEU.trio.2010_03.genotypes.vcf.gz", "YRI.trio.2010_03.genotypes.vcf.gz", "", "06e86711bcf0efc0f0c4a378f6147cf6"); } // official project VCF files in tabix format @Test public void combineTrioCallsMin() { combine2("CEU.trio.2010_03.genotypes.vcf.gz", "YRI.trio.2010_03.genotypes.vcf.gz", " -minimalVCF", "03103f6b39e9fb7a396df0013f01fae6"); } // official project VCF files in tabix format @@ -94,7 +94,7 @@ public class CombineVariantsIntegrationTest extends WalkerTest { @Test public void combineSNPsAndIndels() { combine2("CEU.trio.2010_03.genotypes.vcf.gz", "CEU.dindel.vcf4.low_coverage.2010_06.indel.genotypes.vcf", "", "7e2dba80ba38b2a86713f635d630eb59"); } - @Test public void uniqueSNPs() { combine2("pilot2.snps.vcf4.genotypes.vcf", "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf", "", "63fc20d6223e1387563a1164987d716c"); } + @Test public void uniqueSNPs() { combine2("pilot2.snps.vcf4.genotypes.vcf", "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf", "", "3950392e1b8b53ae363e705185ad1da9"); } @Test public void omniHM3Union() { combineSites(" -filteredRecordsMergeType KEEP_IF_ANY_UNFILTERED", "5c60eb8d5d4b957a0cf52ca008f021ba"); } @Test public void omniHM3Intersect() { combineSites(" -filteredRecordsMergeType KEEP_IF_ALL_UNFILTERED", "774b43e69cc7ec93090b4f6e9f4a1079"); } @@ -110,7 +110,7 @@ public class CombineVariantsIntegrationTest extends WalkerTest { " -priority NA19240_BGI,NA19240_ILLUMINA,NA19240_WUGSC,denovoInfo" + " -genotypeMergeOptions UNIQUIFY -L 1"), 1, - Arrays.asList("988f9d294a8ff4278e40e76a72200bf4")); + Arrays.asList("948291bbf47d1cec692d0fe4358ff92c")); executeTest("threeWayWithRefs", spec); } diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariantsIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariantsIntegrationTest.java index 03060b393..cc9a1c5b7 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariantsIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariantsIntegrationTest.java @@ -49,7 +49,7 @@ public class LiftoverVariantsIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec( "-T LiftoverVariants -o %s -R " + b36KGReference + " --variant:vcf3 " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.500.noheader.unsortedSamples.vcf -chain " + validationDataLocation + "b36ToHg19.broad.over.chain -dict /seq/references/Homo_sapiens_assembly19/v0/Homo_sapiens_assembly19.dict", 1, - Arrays.asList("3fd7ec2dc4064ef410786276b0dc9d08")); + Arrays.asList("07d1bf52125d1f9a25e260e13ec7b010")); executeTest("test b36 to hg19, unsorted samples", spec); } diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/SelectVariantsIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/SelectVariantsIntegrationTest.java index e1e550954..02a6674a0 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/SelectVariantsIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/SelectVariantsIntegrationTest.java @@ -18,7 +18,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec( baseTestString(" -sn A -se '[CDH]' -sf " + samplesFile + " -env -ef -select 'DP < 250' --variant " + testfile), 1, - Arrays.asList("b3df647811b5f13aa8eac080705c1be9") + Arrays.asList("6cd82274335eeb0b449e571f38d54d3a") ); spec.disableShadowBCF(); executeTest("testComplexSelection--" + testfile, spec); @@ -32,7 +32,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec( "-T SelectVariants -R " + b36KGReference + " -L 1:1-1000000 -o %s --no_cmdline_in_header -xl_sn A -xl_sf " + samplesFile + " --variant " + testfile, 1, - Arrays.asList("64f0f3fc7297c21325f76222ccb48b1d") + Arrays.asList("bbd7b28d1c5701e17b395d64f8b6f13d") ); spec.disableShadowBCF(); @@ -46,7 +46,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec( baseTestString(" -sn A -sn B -sn C --variant " + testfile), 1, - Arrays.asList("20936f028bd073224f0adcdb0b9a8dfe") + Arrays.asList("77579c53dbde4e8171f3cee83b98351b") ); executeTest("testRepeatedLineSelection--" + testfile, spec); @@ -153,7 +153,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec( "-T SelectVariants -R " + b37KGReference + " --variant " + testFile + " -o %s --no_cmdline_in_header", 1, - Arrays.asList("b96a09ae32cc3aa300adfba3b5ee71ce") + Arrays.asList("95c4d43b11c3d0dd3ab19941c474269b") ); executeTest("testMultipleRecordsAtOnePositionFirstIsFiltered--" + testFile, spec); @@ -168,7 +168,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest { spec = new WalkerTestSpec( baseTestString(" -sn A -se '[CDH]' -sf " + samplesFile + " -env -ef -select 'DP < 250' --variant " + testfile + " -nt 2"), 1, - Arrays.asList("b3df647811b5f13aa8eac080705c1be9") + Arrays.asList("6cd82274335eeb0b449e571f38d54d3a") ); spec.disableShadowBCF(); executeTest("testParallelization (2 threads)--" + testfile, spec); @@ -182,7 +182,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest { spec = new WalkerTestSpec( baseTestString(" -sn A -se '[CDH]' -sf " + samplesFile + " -env -ef -select 'DP < 250' --variant " + testfile + " -nt 4"), 1, - Arrays.asList("b3df647811b5f13aa8eac080705c1be9") + Arrays.asList("6cd82274335eeb0b449e571f38d54d3a") ); spec.disableShadowBCF(); @@ -196,7 +196,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec( "-T SelectVariants -R " + b37KGReference + " -o %s --no_cmdline_in_header -sf " + samplesFile + " --excludeNonVariants --variant " + testfile, 1, - Arrays.asList("828b4c1ef6ea7e57aad626264cc2c8f6") + Arrays.asList("fa92b3b41f1c04f685be8de32afc9706") ); executeTest("test select from multi allelic with excludeNonVariants --" + testfile, spec); } diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/VCFStreamingIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/VCFStreamingIntegrationTest.java index 4747d57ed..88aa7c29a 100644 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/VCFStreamingIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/VCFStreamingIntegrationTest.java @@ -60,7 +60,7 @@ public class VCFStreamingIntegrationTest extends WalkerTest { " --no_cmdline_in_header " + " -o %s", 1, - Arrays.asList("c145288a9f2dbe3684cace4968f8ca04") + Arrays.asList("c5e93b0e2e8610785d43e5d9e7fb5a7b") ); executeTest("testSimpleVCFStreaming", spec); diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToVCFIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToVCFIntegrationTest.java index 1d990dc4a..fa41d49dc 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToVCFIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToVCFIntegrationTest.java @@ -89,7 +89,7 @@ public class VariantsToVCFIntegrationTest extends WalkerTest { @Test public void testGenotypesToVCFUsingVCFInput() { List md5 = new ArrayList(); - md5.add("86f02e2e764ba35854cff2aa05a1fdd8"); + md5.add("b1ddde7efff9c405f8f92f0a636cd919"); WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-R " + b36KGReference + diff --git a/public/java/test/org/broadinstitute/sting/utils/variantcontext/VariantContextTestProvider.java b/public/java/test/org/broadinstitute/sting/utils/variantcontext/VariantContextTestProvider.java index f54241904..6ff6b5aa1 100644 --- a/public/java/test/org/broadinstitute/sting/utils/variantcontext/VariantContextTestProvider.java +++ b/public/java/test/org/broadinstitute/sting/utils/variantcontext/VariantContextTestProvider.java @@ -294,7 +294,7 @@ public class VariantContextTestProvider { final Genotype homVar = new Genotype("homVar", Arrays.asList(alt1, alt1)); addGenotypeTests(site, homRef, het); addGenotypeTests(site, homRef, het, homVar); - final List noCall = new ArrayList(); + final List noCall = Arrays.asList(Allele.NO_CALL, Allele.NO_CALL); // ploidy if ( ENABLE_PLOIDY_TESTS ) { @@ -526,7 +526,8 @@ public class VariantContextTestProvider { private static void assertAttributesEquals(final Object actual, final Object expected) { if ( expected instanceof Double ) { - BaseTest.assertEqualsDoubleSmart(actual, (Double)expected); + // must be very tolerant because doubles are being rounded to 2 sig figs + BaseTest.assertEqualsDoubleSmart(actual, (Double)expected, 1e-2); } else Assert.assertEquals(actual, expected); } diff --git a/public/java/test/org/broadinstitute/sting/utils/variantcontext/writer/VariantContextWritersUnitTest.java b/public/java/test/org/broadinstitute/sting/utils/variantcontext/writer/VariantContextWritersUnitTest.java index a16cb51b3..ce52d4869 100644 --- a/public/java/test/org/broadinstitute/sting/utils/variantcontext/writer/VariantContextWritersUnitTest.java +++ b/public/java/test/org/broadinstitute/sting/utils/variantcontext/writer/VariantContextWritersUnitTest.java @@ -102,7 +102,7 @@ public class VariantContextWritersUnitTest extends BaseTest { // // -------------------------------------------------------------------------------- - @Test(enabled = false, dataProvider = "VariantContextTest_SingleContexts") + @Test(enabled = true, dataProvider = "VariantContextTest_SingleContexts") public void testVCF4WriterReader(final VariantContextTestProvider.VariantContextTestData testData) throws IOException { VariantContextTestProvider.testReaderWriter(new VCFIOTester(), testData); }