@InternalAPI public abstract class VCFEncoder extends java.lang.Object implements VariantsEncoder
HtsContentType.VARIANT_CONTEXTS encoders.| Constructor and Description |
|---|
VCFEncoder(Bundle outputBundle,
VariantsEncoderOptions variantsEncoderOptions)
InternalAPI
Create a new VCF encoder from a
Bundle. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close any resources associated with this decoder.
|
java.lang.String |
getDisplayName()
Get a user-friendly display name for this encoder.
|
java.lang.String |
getFileFormat()
Get the name of the file format supported by this encoder.
|
Bundle |
getOutputBundle()
Get the output
Bundle for this encoder. |
VariantsEncoderOptions |
getVariantsEncoderOptions()
Get the
VariantsEncoderOptions for this encoder. |
void |
setHeader(VCFHeader vcfHeader)
Set the file format header for this decoder, of type
H. |
void |
write(VariantContext variantContext)
Write a single record to the underlying output.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetVersion@InternalAPI public VCFEncoder(Bundle outputBundle, VariantsEncoderOptions variantsEncoderOptions)
Bundle.
NOTE: callers that provide an output stream resource should provide a buffered output stream
if buffering is desired, since the encoder does not provide an additional buffering layer.outputBundle - the output Bundle to encodevariantsEncoderOptions - the VariantsEncoderOptions to usepublic final java.lang.String getFileFormat()
HtsEncoderBundleResourceType
and BundleResource.getFileFormat()).getFileFormat in interface HtsEncoder<VCFHeader,VariantContext>public final java.lang.String getDisplayName()
HtsEncodergetDisplayName in interface HtsEncoder<VCFHeader,VariantContext>public void setHeader(VCFHeader vcfHeader)
HtsEncoderH. HtsEncoder.setHeader(HtsHeader) must be
called before HtsEncoder.write(HtsRecord) can be called.setHeader in interface HtsEncoder<VCFHeader,VariantContext>vcfHeader - to usepublic void write(VariantContext variantContext)
HtsEncoderHtsEncoder.write(HtsRecord) may only called after
HtsEncoder.setHeader(HtsHeader) has been called.write in interface HtsEncoder<VCFHeader,VariantContext>variantContext - record to writepublic void close()
HtsEncoderclose in interface HtsEncoder<VCFHeader,VariantContext>close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic Bundle getOutputBundle()
Bundle for this encoder.Bundle for this encoderpublic VariantsEncoderOptions getVariantsEncoderOptions()
VariantsEncoderOptions for this encoder.VariantsEncoderOptions for this encoder.