public class SortingVariantContextWriter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static int |
BEFORE_MOST_UPSTREAM_LOC |
protected java.lang.Integer |
mostUpstreamWritableLoc |
Constructor and Description |
---|
SortingVariantContextWriter(VariantContextWriter innerWriter,
int maxCachingStartDistance) |
SortingVariantContextWriter(VariantContextWriter innerWriter,
int maxCachingStartDistance,
boolean takeOwnershipOfInner)
create a local-sorting VCF writer, given an inner VCF writer to write to
|
Modifier and Type | Method and Description |
---|---|
void |
add(VariantContext vc)
add a record to the file
|
boolean |
checkError() |
void |
close()
attempt to close the VCF file; we need to flush the queue first
|
protected void |
emitSafeRecords() |
protected void |
noteCurrentRecord(VariantContext vc) |
java.lang.String |
toString()
Gets a string representation of this object.
|
void |
writeHeader(VCFHeader header) |
protected java.lang.Integer mostUpstreamWritableLoc
protected static final int BEFORE_MOST_UPSTREAM_LOC
public SortingVariantContextWriter(VariantContextWriter innerWriter, int maxCachingStartDistance, boolean takeOwnershipOfInner)
innerWriter
- the VCFWriter to write tomaxCachingStartDistance
- the maximum start distance between records that we'll cachetakeOwnershipOfInner
- Should this Writer close innerWriter when it's done with itpublic SortingVariantContextWriter(VariantContextWriter innerWriter, int maxCachingStartDistance)
protected void noteCurrentRecord(VariantContext vc)
public boolean checkError()
public void writeHeader(VCFHeader header)
writeHeader
in interface VariantContextWriter
public void close()
close
in interface VariantContextWriter
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
public void add(VariantContext vc)
add
in interface VariantContextWriter
vc
- the Variant Context objectpublic java.lang.String toString()
toString
in class java.lang.Object
protected void emitSafeRecords()