diff --git a/build.xml b/build.xml index 3775780f1..55cc0f555 100644 --- a/build.xml +++ b/build.xml @@ -1140,7 +1140,7 @@ verbose="2" workingDir="${basedir}" useDefaultListeners="false" - listeners="org.testng.reporters.FailedReporter,org.testng.reporters.JUnitXMLReporter,org.broadinstitute.sting.StingTextReporter"> + listeners="org.testng.reporters.FailedReporter,org.testng.reporters.JUnitXMLReporter,org.broadinstitute.sting.StingTextReporter,org.uncommons.reportng.HTMLReporter"> diff --git a/ivy.xml b/ivy.xml index 84a2faaea..9cc92d890 100644 --- a/ivy.xml +++ b/ivy.xml @@ -83,6 +83,7 @@ + diff --git a/public/java/src/org/broadinstitute/sting/gatk/io/storage/VariantContextWriterStorage.java b/public/java/src/org/broadinstitute/sting/gatk/io/storage/VariantContextWriterStorage.java index 2ca7b46de..665788e07 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/io/storage/VariantContextWriterStorage.java +++ b/public/java/src/org/broadinstitute/sting/gatk/io/storage/VariantContextWriterStorage.java @@ -105,7 +105,7 @@ public class VariantContextWriterStorage implements Storage, Var vcfHeader.addMetaDataLine(commandLineArgHeaderLine); } - vcfHeader = VCFUtils.withUpdatedContigs(vcfHeader, engine); + //vcfHeader = VCFUtils.withUpdatedContigs(vcfHeader, engine); } outputTracker.getStorage(this).writeHeader(vcfHeader); diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/qc/RodSystemValidationWalker.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/qc/RodSystemValidationWalker.java index 1c24f3879..c9602cd6f 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/qc/RodSystemValidationWalker.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/qc/RodSystemValidationWalker.java @@ -87,7 +87,7 @@ public class RodSystemValidationWalker extends RodWalker { rodList = this.getToolkit().getRodDataSources(); for (ReferenceOrderedDataSource rod : rodList) { out.println(rod.getName() + DIVIDER + rod.getType()); - out.println(rod.getName() + DIVIDER + rod.getFile()); + out.println(rod.getName() + DIVIDER + rod.getFile().getName()); out.println(rod.getName() + DIVIDER + md5sum(rod.getFile())); } out.println("Data:"); diff --git a/public/java/test/org/broadinstitute/sting/BaseTest.java b/public/java/test/org/broadinstitute/sting/BaseTest.java index fbcac5342..22b442043 100755 --- a/public/java/test/org/broadinstitute/sting/BaseTest.java +++ b/public/java/test/org/broadinstitute/sting/BaseTest.java @@ -9,6 +9,7 @@ import org.broadinstitute.sting.commandline.CommandLineUtils; import org.broadinstitute.sting.utils.crypt.CryptUtils; import org.broadinstitute.sting.utils.exceptions.ReviewedStingException; import org.broadinstitute.sting.utils.io.IOUtils; +import org.testng.Reporter; import java.io.File; import java.io.IOException; @@ -254,4 +255,13 @@ public abstract class BaseTest { file.deleteOnExit(); return file; } + + /** + * Log this message so that it shows up inline during output as well as in html reports + * + * @param message + */ + public static void log(final String message) { + Reporter.log(message, true); + } } diff --git a/public/java/test/org/broadinstitute/sting/MD5DB.java b/public/java/test/org/broadinstitute/sting/MD5DB.java index c9f53c581..e756c9864 100644 --- a/public/java/test/org/broadinstitute/sting/MD5DB.java +++ b/public/java/test/org/broadinstitute/sting/MD5DB.java @@ -171,12 +171,13 @@ public class MD5DB { } public static class MD5Match { - final String md5; + final String actualMD5, expectedMD5; final String failMessage; boolean failed; - public MD5Match(final String md5, final String failMessage, final boolean failed) { - this.md5 = md5; + public MD5Match(final String actualMD5, final String expectedMD5, final String failMessage, final boolean failed) { + this.actualMD5 = actualMD5; + this.expectedMD5 = expectedMD5; this.failMessage = failMessage; this.failed = failed; } @@ -191,20 +192,20 @@ public class MD5DB { * @return The calculated MD5. */ public static MD5Match assertMatchingMD5(final String name, final File resultsFile, final String expectedMD5, final boolean parameterize) { - final String filemd5sum = testFileMD5(name, resultsFile, expectedMD5, parameterize); + final String actualMD5 = testFileMD5(name, resultsFile, expectedMD5, parameterize); String failMessage = null; boolean failed = false; if (parameterize || expectedMD5.equals("")) { // Don't assert - } else if ( filemd5sum.equals(expectedMD5) ) { - System.out.println(String.format(" => %s PASSED (expected=%s)", name, expectedMD5)); + } else if ( actualMD5.equals(expectedMD5) ) { + //BaseTest.log(String.format(" => %s PASSED (expected=%s)", name, expectedMD5)); } else { failed = true; - failMessage = String.format("%s has mismatching MD5s: expected=%s observed=%s", name, expectedMD5, filemd5sum); + failMessage = String.format("%s has mismatching MD5s: expected=%s observed=%s", name, expectedMD5, actualMD5); } - return new MD5Match(filemd5sum, failMessage, failed); + return new MD5Match(actualMD5, expectedMD5, failMessage, failed); } @@ -230,8 +231,7 @@ public class MD5DB { updateMD5Db(filemd5sum, resultsFile); if (parameterize || expectedMD5.equals("")) { - System.out.println(String.format("PARAMETERIZATION[%s]: file %s has md5 = %s, stated expectation is %s, equal? = %b", - name, resultsFile, filemd5sum, expectedMD5, filemd5sum.equals(expectedMD5))); + BaseTest.log(String.format("PARAMETERIZATION: file %s has md5 = %s", resultsFile, filemd5sum)); } else { //System.out.println(String.format("Checking MD5 for %s [calculated=%s, expected=%s]", resultsFile, filemd5sum, expectedMD5)); //System.out.flush(); @@ -242,16 +242,23 @@ 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]"); - System.out.printf("##### Path to expected file (MD5=%s): %s%n", expectedMD5, pathToExpectedMD5File); - System.out.printf("##### Path to calculated file (MD5=%s): %s%n", filemd5sum, pathToFileMD5File); - System.out.printf("##### Diff command: diff %s %s%n", pathToExpectedMD5File, pathToFileMD5File); + BaseTest.log(String.format("expected %s at %s", expectedMD5, pathToExpectedMD5File)); + BaseTest.log(String.format("calculated %s at %s", filemd5sum, pathToFileMD5File)); + BaseTest.log(String.format("diff %s %s", pathToExpectedMD5File, pathToFileMD5File)); // inline differences - DiffEngine.SummaryReportParams params = new DiffEngine.SummaryReportParams(System.out, 20, 10, 0); + // TODO -- capture output and put in log + final ByteArrayOutputStream baos = new ByteArrayOutputStream(); + final PrintStream ps = new PrintStream(baos); + DiffEngine.SummaryReportParams params = new DiffEngine.SummaryReportParams(ps, 20, 10, 0); boolean success = DiffEngine.simpleDiffFiles(new File(pathToExpectedMD5File), new File(pathToFileMD5File), MAX_RECORDS_TO_READ, params); - if ( success ) + if ( success ) { + final String content = baos.toString(); + BaseTest.log(content); System.out.printf("Note that the above list is not comprehensive. At most 20 lines of output, and 10 specific differences will be listed. Please use -T DiffObjects -R public/testdata/exampleFASTA.fasta -m %s -t %s to explore the differences more freely%n", pathToExpectedMD5File, pathToFileMD5File); + } + ps.close(); } } diff --git a/public/java/test/org/broadinstitute/sting/MD5Mismatch.java b/public/java/test/org/broadinstitute/sting/MD5Mismatch.java new file mode 100644 index 000000000..cc1344d55 --- /dev/null +++ b/public/java/test/org/broadinstitute/sting/MD5Mismatch.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2012, The Broad Institute + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +package org.broadinstitute.sting; + +import java.util.Collections; +import java.util.List; + +/** + * Assertion failure representing an MD5 mismatch between expected and actual + * + * @author Your Name + * @since Date created + */ +public class MD5Mismatch extends Exception { + final List actuals, expecteds; + + public MD5Mismatch(final String actual, final String expected) { + this(Collections.singletonList(actual), Collections.singletonList(expected)); + } + + public MD5Mismatch(final List actuals, final List expecteds) { + super(formatMessage(actuals, expecteds)); + this.actuals = actuals; + this.expecteds = expecteds; + } + + @Override + public String toString() { + return formatMessage(actuals, expecteds); + } + + private final static String formatMessage(final List actuals, final List expecteds) { + final StringBuilder b = new StringBuilder("MD5 mismatch: "); + for ( int i = 0; i < actuals.size(); i++ ) { + if ( i > 1 ) b.append("\t\t\n"); + b.append("actual ").append(actuals.get(i)); + b.append(" expected ").append(expecteds.get(i)); + } + return b.toString(); + } +} diff --git a/public/java/test/org/broadinstitute/sting/WalkerTest.java b/public/java/test/org/broadinstitute/sting/WalkerTest.java index 6122273c8..a13f74193 100755 --- a/public/java/test/org/broadinstitute/sting/WalkerTest.java +++ b/public/java/test/org/broadinstitute/sting/WalkerTest.java @@ -43,7 +43,6 @@ import org.testng.Assert; import org.testng.annotations.BeforeMethod; import java.io.File; -import java.io.IOException; import java.util.*; public class WalkerTest extends BaseTest { @@ -61,7 +60,7 @@ public class WalkerTest extends BaseTest { } public void validateOutputBCFIfPossible(final String name, final File resultFile) { - final File bcfFile = new File(resultFile.getAbsolutePath() + ".bcf"); + final File bcfFile = new File(resultFile.getAbsolutePath().replace(".vcf", ".bcf")); if ( bcfFile.exists() ) { logger.warn("Checking shadow BCF output file " + bcfFile + " against VCF file " + resultFile); try { @@ -105,17 +104,23 @@ public class WalkerTest extends BaseTest { if ( ! result.failed ) { validateOutputIndex(name, resultFiles.get(i)); validateOutputBCFIfPossible(name, resultFiles.get(i)); - md5s.add(result.md5); + md5s.add(result.expectedMD5); } else { fails.add(result); } } if ( ! fails.isEmpty() ) { + List actuals = new ArrayList(); + List expecteds = new ArrayList(); for ( final MD5DB.MD5Match fail : fails ) { + actuals.add(fail.actualMD5); + expecteds.add(fail.expectedMD5); logger.warn("Fail: " + fail.failMessage); } - Assert.fail("Test failed: " + name); + + final MD5Mismatch failure = new MD5Mismatch(actuals, expecteds); + Assert.fail(failure.toString(), failure); } return md5s; @@ -335,10 +340,10 @@ public class WalkerTest extends BaseTest { gotAnException = true; if ( expectedException != null ) { // we expect an exception - System.out.println(String.format("Wanted exception %s, saw %s", expectedException, e.getClass())); + //System.out.println(String.format("Wanted exception %s, saw %s", expectedException, e.getClass())); if ( expectedException.isInstance(e) ) { // it's the type we expected - System.out.println(String.format(" => %s PASSED", name)); + //System.out.println(String.format(" => %s PASSED", name)); } else { if ( e.getCause() != null ) e.getCause().printStackTrace(System.out); // must print to stdout to see the message @@ -368,5 +373,5 @@ public class WalkerTest extends BaseTest { File fl = new File(name); fl.deleteOnExit(); return fl; - } + } } diff --git a/public/java/test/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackBuilderUnitTest.java b/public/java/test/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackBuilderUnitTest.java index be83bb3dd..724c343e4 100644 --- a/public/java/test/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackBuilderUnitTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackBuilderUnitTest.java @@ -79,7 +79,7 @@ public class RMDTrackBuilderUnitTest extends BaseTest { @Test // in this test, the index exists, but is out of date. public void testBuilderIndexUnwriteable() { - File vcfFile = new File(testDir + "/ROD_validation/read_only/relic.vcf"); + File vcfFile = new File(validationDataLocation + "/ROD_validation/read_only/relic.vcf"); try { builder.loadIndex(vcfFile, new VCF3Codec()); } catch (IOException e) { @@ -96,7 +96,7 @@ public class RMDTrackBuilderUnitTest extends BaseTest { // sure we don't do this @Test public void testDirIsLockedIndexFromDisk() { - File vcfFile = new File(testDir + "/ROD_validation/read_only/good_index.vcf"); + File vcfFile = new File(validationDataLocation + "/ROD_validation/read_only/good_index.vcf"); File vcfFileIndex = Tribble.indexFile(vcfFile); Index ind = null; try { @@ -112,7 +112,7 @@ public class RMDTrackBuilderUnitTest extends BaseTest { @Test public void testBuilderIndexDirectoryUnwritable() { - File vcfFile = new File(testDir + "/ROD_validation/read_only/no_index.vcf"); + File vcfFile = new File(validationDataLocation + "/ROD_validation/read_only/no_index.vcf"); File vcfFileIndex = Tribble.indexFile(vcfFile); Index ind = null; @@ -131,7 +131,7 @@ public class RMDTrackBuilderUnitTest extends BaseTest { @Test public void testGenerateIndexForUnindexedFile() { - File vcfFile = new File(testDir + "/ROD_validation/always_reindex.vcf"); + File vcfFile = new File(validationDataLocation + "/ROD_validation/always_reindex.vcf"); File vcfFileIndex = Tribble.indexFile(vcfFile); // if we can't write to the directory, don't fault the tester, just pass @@ -157,7 +157,7 @@ public class RMDTrackBuilderUnitTest extends BaseTest { // test to make sure we get a full sequence dictionary from the VCF (when we set the dictionary in the builder) @Test public void testBuilderIndexSequenceDictionary() { - File vcfFile = createCorrectDateIndexFile(new File(testDir + "/ROD_validation/newerTribbleTrack.vcf")); + File vcfFile = createCorrectDateIndexFile(new File(validationDataLocation + "/ROD_validation/newerTribbleTrack.vcf")); Long indexTimeStamp = Tribble.indexFile(vcfFile).lastModified(); try { Index idx = builder.loadIndex(vcfFile, new VCFCodec()); 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 5546a5cb7..bf2f6fb3d 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 @@ -41,7 +41,7 @@ public class BeagleIntegrationTest extends WalkerTest { "--beagleR2:BEAGLE " + beagleValidationDataLocation + "inttestbgl.r2 " + "--beagleProbs:BEAGLE " + beagleValidationDataLocation + "inttestbgl.gprobs " + "--beaglePhased:BEAGLE " + beagleValidationDataLocation + "inttestbgl.phased " + - "-o %s --no_cmdline_in_header", 1, Arrays.asList("6d0f213918e3b9ea33bc2f8a51a462f1")); + "-o %s --no_cmdline_in_header", 1, Arrays.asList("93962cac4c308908bd20df8c5763d5e2")); executeTest("test BeagleOutputToVCF", spec); } diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalIntegrationTest.java index 7ebcb744b..bdd028414 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalIntegrationTest.java @@ -31,7 +31,7 @@ import org.testng.annotations.Test; import java.util.Arrays; public class VariantEvalIntegrationTest extends WalkerTest { - private static String variantEvalTestDataRoot = validationDataLocation + "VariantEval"; + private static String variantEvalTestDataRoot = validationDataLocation + "VariantEval/"; private static String fundamentalTestVCF = variantEvalTestDataRoot + "/" + "FundamentalsTest.annotated.db.subset.snps_and_indels.vcf"; private static String fundamentalTestSNPsVCF = variantEvalTestDataRoot + "/" + "FundamentalsTest.annotated.db.subset.final.vcf"; private static String fundamentalTestSNPsSplit1of2VCF = variantEvalTestDataRoot + "/" + "FundamentalsTest.annotated.db.subset.final.split_1_of_2.vcf"; 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 f8ac7c135..e1e550954 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("d18516c1963802e92cb9e425c0b75fd6") + Arrays.asList("b3df647811b5f13aa8eac080705c1be9") ); 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("730f021fd6ecf1d195dabbee2e233bfd") + Arrays.asList("64f0f3fc7297c21325f76222ccb48b1d") ); 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("5085a2f8cddfeae9f6274f905025184f") + Arrays.asList("20936f028bd073224f0adcdb0b9a8dfe") ); executeTest("testRepeatedLineSelection--" + testfile, spec); @@ -59,7 +59,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec( "-T SelectVariants -R " + hg19Reference + " -sn NA12878 -L 20:1012700-1020000 --variant " + b37hapmapGenotypes + " -disc " + testFile + " -o %s --no_cmdline_in_header", 1, - Arrays.asList("929bbb96381541c162dc7e5462e26ea2") + Arrays.asList("03abdc27bfd7aa36d57bba0325b31e0d") ); spec.disableShadowBCF(); @@ -73,7 +73,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec( "-T SelectVariants -R " + hg19Reference + " -L 20:1012700-1020000 --variant " + b37hapmapGenotypes + " -disc " + testFile + " -o %s --no_cmdline_in_header", 1, - Arrays.asList("5d7d899c0c4954ec59104aebfe4addd5") + Arrays.asList("9fb54ed003234a5847c565ffb6767b95") ); spec.disableShadowBCF(); @@ -87,7 +87,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec( "-T SelectVariants -R " + hg19Reference + " -sn NA12878 -L 20:1012700-1020000 -conc " + b37hapmapGenotypes + " --variant " + testFile + " -o %s --no_cmdline_in_header", 1, - Arrays.asList("d2ba3ea30a810f6f0fbfb1b643292b6a") + Arrays.asList("76857b016198c3e08a2e27bbdb49f3f0") ); spec.disableShadowBCF(); @@ -101,7 +101,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec( "-T SelectVariants -R " + b36KGReference + " -restrictAllelesTo MULTIALLELIC -selectType MIXED --variant " + testFile + " -o %s --no_cmdline_in_header", 1, - Arrays.asList("e0b12c0b47a8a7a988b3587b47bfa8cf") + Arrays.asList("6c0b0c5f03d26f4a7a1438a2afc9fb6b") ); executeTest("testVariantTypeSelection--" + testFile, spec); @@ -114,7 +114,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec( "-T SelectVariants -R " + b36KGReference + " -sn NA12892 --variant:dbsnp " + testFile + " -o %s --no_cmdline_in_header", 1, - Arrays.asList("167a1265df820978a74c267df44d5c43") + Arrays.asList("a8a26c621018142c9cba1080cbe687a8") ); executeTest("testUsingDbsnpName--" + testFile, spec); @@ -127,7 +127,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec( "-T SelectVariants -R " + b36KGReference + " -regenotype -sn NA12892 --variant " + testFile + " -o %s --no_cmdline_in_header", 1, - Arrays.asList("0fd8e52bdcd1f4b921d8fb5c689f196a") + Arrays.asList("6bee6dc2316aa539560a6d9d8adbc4ff") ); executeTest("testRegenotype--" + testFile, spec); @@ -140,7 +140,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec( "-T SelectVariants -R " + b36KGReference + " -select 'KG_FREQ < 0.5' --variant " + testFile + " -o %s --no_cmdline_in_header", 1, - Arrays.asList("ffa2524380d84a870d2e4a33d9f3d31a") + Arrays.asList("6ff686a64e98fc1be2cde9b034d4a43a") ); executeTest("testMultipleRecordsAtOnePositionFirstIsFiltered--" + testFile, spec); @@ -153,14 +153,14 @@ public class SelectVariantsIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec( "-T SelectVariants -R " + b37KGReference + " --variant " + testFile + " -o %s --no_cmdline_in_header", 1, - Arrays.asList("f17885e5cbd5387edb99112047ea43c1") + Arrays.asList("b96a09ae32cc3aa300adfba3b5ee71ce") ); executeTest("testMultipleRecordsAtOnePositionFirstIsFiltered--" + testFile, spec); } @Test - public void testParallelization() { + public void testParallelization2() { String testfile = validationDataLocation + "test.filtered.maf_annotated.vcf"; String samplesFile = validationDataLocation + "SelectVariants.samples.txt"; WalkerTestSpec spec; @@ -168,15 +168,21 @@ 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("d18516c1963802e92cb9e425c0b75fd6") + Arrays.asList("b3df647811b5f13aa8eac080705c1be9") ); spec.disableShadowBCF(); executeTest("testParallelization (2 threads)--" + testfile, spec); + } - spec = new WalkerTestSpec( + @Test + public void testParallelization4() { + String testfile = validationDataLocation + "test.filtered.maf_annotated.vcf"; + String samplesFile = validationDataLocation + "SelectVariants.samples.txt"; + WalkerTestSpec spec; + spec = new WalkerTestSpec( baseTestString(" -sn A -se '[CDH]' -sf " + samplesFile + " -env -ef -select 'DP < 250' --variant " + testfile + " -nt 4"), 1, - Arrays.asList("d18516c1963802e92cb9e425c0b75fd6") + Arrays.asList("b3df647811b5f13aa8eac080705c1be9") ); spec.disableShadowBCF(); @@ -190,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("3fb50cc1c955491048108956d7087c35") + Arrays.asList("828b4c1ef6ea7e57aad626264cc2c8f6") ); 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 b20240fd8..4747d57ed 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 @@ -57,10 +57,10 @@ public class VCFStreamingIntegrationTest extends WalkerTest { "-T SelectVariants" + " -R " + b36KGReference + " --variant:vcf3,storage=STREAM " + tmpFifo.getAbsolutePath() + - " ---no_cmdline_in_header" + + " --no_cmdline_in_header " + " -o %s", 1, - Arrays.asList("658f580f7a294fd334bd897102616fed") + Arrays.asList("c145288a9f2dbe3684cace4968f8ca04") ); executeTest("testSimpleVCFStreaming", spec); @@ -81,7 +81,7 @@ public class VCFStreamingIntegrationTest extends WalkerTest { "-T SelectVariants" + " -R " + b36KGReference + " --variant:vcf3,storage=STREAM " + testFile + - " ---no_cmdline_in_header" + + " --no_cmdline_in_header" + " -select 'QD > 2.0'" + " -o " + tmpFifo.getAbsolutePath(), 0, diff --git a/public/java/test/org/broadinstitute/sting/MedianUnitTest.java b/public/java/test/org/broadinstitute/sting/utils/MedianUnitTest.java similarity index 97% rename from public/java/test/org/broadinstitute/sting/MedianUnitTest.java rename to public/java/test/org/broadinstitute/sting/utils/MedianUnitTest.java index db89aee78..08953ba13 100644 --- a/public/java/test/org/broadinstitute/sting/MedianUnitTest.java +++ b/public/java/test/org/broadinstitute/sting/utils/MedianUnitTest.java @@ -23,15 +23,14 @@ */ // our package -package org.broadinstitute.sting; +package org.broadinstitute.sting.utils; // the imports for unit testing. -import org.broadinstitute.sting.utils.Median; +import org.broadinstitute.sting.BaseTest; import org.testng.Assert; -import org.testng.annotations.BeforeSuite; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; diff --git a/public/java/test/org/broadinstitute/sting/utils/codecs/vcf/VCFIntegrationTest.java b/public/java/test/org/broadinstitute/sting/utils/codecs/vcf/VCFIntegrationTest.java index ce5851db5..85fbbace2 100644 --- a/public/java/test/org/broadinstitute/sting/utils/codecs/vcf/VCFIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/utils/codecs/vcf/VCFIntegrationTest.java @@ -35,7 +35,7 @@ public class VCFIntegrationTest extends WalkerTest { String baseCommand = "-R " + b37KGReference + " --no_cmdline_in_header -o %s "; String test1 = baseCommand + "-T SelectVariants -V " + testVCF; - WalkerTestSpec spec1 = new WalkerTestSpec(test1, 1, Arrays.asList("acee3b6bdb4b759992f54065c675a249")); + WalkerTestSpec spec1 = new WalkerTestSpec(test1, 1, Arrays.asList("0cb81b9332fc21d03e74caff770b8a4a")); executeTest("Test reading and writing breakpoint VCF", spec1); } @@ -46,7 +46,7 @@ public class VCFIntegrationTest extends WalkerTest { String baseCommand = "-R " + b37KGReference + " --no_cmdline_in_header -o %s "; String test1 = baseCommand + "-T SelectVariants -V " + testVCF; - WalkerTestSpec spec1 = new WalkerTestSpec(test1, 1, Arrays.asList("87d5b180ef5f9dc5aaee4b02601b43a2")); + WalkerTestSpec spec1 = new WalkerTestSpec(test1, 1, Arrays.asList("109bf9347965eb47706b4916bdd48a7a")); executeTest("Test reading and writing samtools vcf", spec1); } }