Class BCF2FieldWriterManager
- java.lang.Object
-
- htsjdk.variant.variantcontext.writer.BCF2FieldWriterManager
-
public class BCF2FieldWriterManager extends Object
See #BCFWriter for documentation on this classes role in encoding BCF2 files- Since:
- 06/12
-
-
Constructor Summary
Constructors Constructor Description BCF2FieldWriterManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BCF2FieldWriter.GenotypesWriter
getGenotypeFieldWriter(String field)
Get a genotypes writer specialized to encode values for genotypes fieldBCF2FieldWriter.SiteWriter
getSiteFieldWriter(String field)
Get a site writer specialized to encode values for site info field<T> T
getWriter(String key, Map<String,T> map)
void
setup(VCFHeader header, BCF2Encoder encoder, Map<String,Integer> stringDictionary)
Setup the FieldWriters appropriate to each INFO and FORMAT in the VCF header Must be called before any of the getter methods will work
-
-
-
Method Detail
-
setup
public void setup(VCFHeader header, BCF2Encoder encoder, Map<String,Integer> stringDictionary)
Setup the FieldWriters appropriate to each INFO and FORMAT in the VCF header Must be called before any of the getter methods will work- Parameters:
header
- a VCFHeader containing description for every INFO and FORMAT field we'll attempt to write out to BCFencoder
- the encoder we are going to use to write out the BCF2 datastringDictionary
- a map from VCFHeader strings to their offsets for encoding
-
getSiteFieldWriter
public BCF2FieldWriter.SiteWriter getSiteFieldWriter(String field)
Get a site writer specialized to encode values for site info field- Parameters:
field
- key found in the VCF header INFO records- Returns:
- non-null writer if one can be found, or null if none exists for field
-
getGenotypeFieldWriter
public BCF2FieldWriter.GenotypesWriter getGenotypeFieldWriter(String field)
Get a genotypes writer specialized to encode values for genotypes field- Parameters:
field
- key found in the VCF header FORMAT records- Returns:
- non-null writer if one can be found, or null if none exists for field
-
-