Resolves GSA-681 / Compressed VCF.gz output is too big because of unnecessary call to flush().

-- Now compressed output VCFs are properly blocked compressed (i.e., they are actually smaller than the uncompressed VCF)
This commit is contained in:
Mark DePristo 2012-12-12 10:27:07 -05:00
parent dd52a70d45
commit 5632c13bf2
2 changed files with 3 additions and 2 deletions

View File

@ -96,7 +96,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
//
// --------------------------------------------------------------------------------------------------------------
private final static String COMPRESSED_OUTPUT_MD5 = "5b8f477c287770b5769b05591e35bc2d";
private final static String COMPRESSED_OUTPUT_MD5 = "3eba6c309514d1e9ee06a20a112b68e6";
@Test
public void testCompressedOutput() {

View File

@ -248,7 +248,8 @@ class VCFWriter extends IndexingVariantContextWriter {
}
mWriter.write("\n");
mWriter.flush(); // necessary so that writing to an output stream will work
// note that we cannot call flush here if we want block gzipping to work properly
// calling flush results in all gzipped blocks for each variant
} catch (IOException e) {
throw new RuntimeException("Unable to write the VCF object to " + getStreamName(), e);
}