diff --git a/java/src/org/broadinstitute/sting/gatk/io/storage/VCFWriterStorage.java b/java/src/org/broadinstitute/sting/gatk/io/storage/VCFWriterStorage.java index d2ef9d6a9..f8911a1f7 100644 --- a/java/src/org/broadinstitute/sting/gatk/io/storage/VCFWriterStorage.java +++ b/java/src/org/broadinstitute/sting/gatk/io/storage/VCFWriterStorage.java @@ -60,7 +60,7 @@ public class VCFWriterStorage implements Storage, VCFWriter { throw new UserException.CouldNotCreateOutputFile(file, "Unable to open target output stream", ex); } - return new StandardVCFWriter(file, this.stream); + return new StandardVCFWriter(file, this.stream, ! stub.isCompressed()); } @@ -117,6 +117,7 @@ public class VCFWriterStorage implements Storage, VCFWriter { // } public void mergeInto(VCFWriterStorage target) { try { + System.out.printf("merging %s%n", file); BasicFeatureSource source = BasicFeatureSource.getFeatureSource(file.getAbsolutePath(), new VCFCodec()); for ( VariantContext vc : source.iterator() ) { diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java index ea59b9eb8..33fb39b66 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java @@ -45,6 +45,31 @@ public class executeTest("testSingleSamplePilot2 - Joint Estimate", spec); } + // -------------------------------------------------------------------------------------------------------------- + // + // testing compressed output + // + // -------------------------------------------------------------------------------------------------------------- + + private final static String COMPRESSED_OUTPUT_MD5 = "dfbdccf53668b95e3490c198cbad77e8"; + + @Test + public void testCompressedOutput() { + 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("gz"), Arrays.asList(COMPRESSED_OUTPUT_MD5)); + executeTest("testCompressedOutput", spec); + } + + // todo -- fixme +// @Test +// public void testCompressedOutputParallel() { +// 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 -nt 4", 1, +// Arrays.asList("gz"), Arrays.asList(COMPRESSED_OUTPUT_MD5)); +// executeTest("testCompressedOutput-nt4", spec); +// } + // -------------------------------------------------------------------------------------------------------------- // // testing parallelization