@Override public boolean close() { writer.close(); return true; }
/** * Close the VCF storage object. */ public void close() { writer.close(); closed = true; }
@Override public boolean close() { variantContextWriter.close(); return true; } }
@Override public void close() { for ( final VariantContextWriter writer : writers ) writer.close(); }
public void close() throws IOException { // close everything if (writer != null) { writer.close(); } if (outputStream != null) { outputStream.close(); } }
public void onTraversalDone(Integer result) { writer.close(); System.out.println(result + " variants were aligned"); }
public void onTraversalDone(Integer result) { System.out.println(result + " MNPs were broken up into primitives"); vcfWriter.close(); }
public void onTraversalDone(Integer sum) { if ( dbsnpIterator != null ) dbsnpIterator.close(); vcfwriter.close(); } }
/** * @{inheritDoc} */ @Override public void close() { outputTracker.getStorage(this).close(); }
public void onTraversalDone(Integer result) { if ( !queue.isEmpty() ) purgeQueue(); writer.close(); }
public void close() { stopWaitingToMerge(); if (takeOwnershipOfInner) innerWriter.close(); }
/** * attempt to close the VCF file; we need to flush the queue first */ @Override public void close() { stopWaitingToSort(); if (takeOwnershipOfInner) innerWriter.close(); }
/** * Horrible work around because there's no clean way to get our VCFWriter closed by the GATK * * If closeUnderlyingWriter is true, then we'll close the underlying writer, otherwise we'll leave it open * so the GATK closes it later * * @param closeUnderlyingWriter should we leave the underlying writer open or closed? */ public void close(final boolean closeUnderlyingWriter) { emitCurrentBlock(); if ( closeUnderlyingWriter ) underlyingWriter.close(); }
/** * attempt to close the VCF file; we need to flush the queue first */ @Override public void close() { stopWaitingToSort(); if (takeOwnershipOfInner) innerWriter.close(); }
/** * attempt to close the VCF file; we need to flush the queue first */ @Override public void close() { stopWaitingToSort(); if (takeOwnershipOfInner) innerWriter.close(); }
protected void writeVcf(File vcf, Iterable<VariantContext> calls) { VariantContextWriter writer = context.getVariantContextWriter(vcf, true); for (VariantContext vc : calls) { writer.add(vc); } writer.close(); } protected String getChr() { return chr; }
private static void writeVCsToFile(final VariantContextWriter writer, final VCFHeader header, final Iterable<VariantContext> vcs) { // write writer.writeHeader(header); for ( VariantContext vc : vcs ) if (vc != null) writer.add(vc); writer.close(); }
private void innerWriteToFifo(String pathToFifo) { // Do not enable INDEX_OF_THE_FLY because that is not compatible with writing to a pipe. final VariantContextWriterBuilder builder = new VariantContextWriterBuilder() .clearOptions() .setReferenceDictionary(dictionary); Path vcfPath = Paths.get(pathToFifo); VariantContextWriter writer = builder.setOutputPath(vcfPath).build(); writer.writeHeader(new VCFHeader()); writer.close(); }
@Test public void testWriteHeader() throws Exception { FeatureCodec codec = CodecFactory.getCodec(inpath, genome); AbstractFeatureReader<Feature, ?> bfs = AbstractFeatureReader.getFeatureReader(inpath, codec, false); VCFHeader header0 = (VCFHeader) bfs.getHeader(); VariantContextWriter writer = getWriter(); writer.writeHeader(header0); writer.close(); AbstractFeatureReader<Feature, ?> bfs1 = AbstractFeatureReader.getFeatureReader(outFile.getAbsolutePath(), codec, false); VCFHeader header1 = (VCFHeader) bfs1.getHeader(); assertHeadersEquals(header0, header1); }