/** * Setup the FieldWriters appropriate to each INFO and FORMAT in the VCF header * * Must be called before any of the getter methods will work * * @param header a VCFHeader containing description for every INFO and FORMAT field we'll attempt to write out to BCF * @param encoder the encoder we are going to use to write out the BCF2 data * @param stringDictionary a map from VCFHeader strings to their offsets for encoding */ public void setup(final VCFHeader header, final BCF2Encoder encoder, final Map<String, Integer> stringDictionary) { for (final VCFInfoHeaderLine line : header.getInfoHeaderLines()) { final String field = line.getID(); final BCF2FieldWriter.SiteWriter writer = createInfoWriter(header, line, encoder, stringDictionary); add(siteWriters, field, writer); } for (final VCFFormatHeaderLine line : header.getFormatHeaderLines()) { final String field = line.getID(); final BCF2FieldWriter.GenotypesWriter writer = createGenotypesWriter(header, line, encoder, stringDictionary); add(genotypesWriters, field, writer); } }
/** * Setup the FieldWriters appropriate to each INFO and FORMAT in the VCF header * * Must be called before any of the getter methods will work * * @param header a VCFHeader containing description for every INFO and FORMAT field we'll attempt to write out to BCF * @param encoder the encoder we are going to use to write out the BCF2 data * @param stringDictionary a map from VCFHeader strings to their offsets for encoding */ public void setup(final VCFHeader header, final BCF2Encoder encoder, final Map<String, Integer> stringDictionary) { for (final VCFInfoHeaderLine line : header.getInfoHeaderLines()) { final String field = line.getID(); final BCF2FieldWriter.SiteWriter writer = createInfoWriter(header, line, encoder, stringDictionary); add(siteWriters, field, writer); } for (final VCFFormatHeaderLine line : header.getFormatHeaderLines()) { final String field = line.getID(); final BCF2FieldWriter.GenotypesWriter writer = createGenotypesWriter(header, line, encoder, stringDictionary); add(genotypesWriters, field, writer); } }
/** * Setup the FieldWriters appropriate to each INFO and FORMAT in the VCF header * * Must be called before any of the getter methods will work * * @param header a VCFHeader containing description for every INFO and FORMAT field we'll attempt to write out to BCF * @param encoder the encoder we are going to use to write out the BCF2 data * @param stringDictionary a map from VCFHeader strings to their offsets for encoding */ public void setup(final VCFHeader header, final BCF2Encoder encoder, final Map<String, Integer> stringDictionary) { for (final VCFInfoHeaderLine line : header.getInfoHeaderLines()) { final String field = line.getID(); final BCF2FieldWriter.SiteWriter writer = createInfoWriter(header, line, encoder, stringDictionary); add(siteWriters, field, writer); } for (final VCFFormatHeaderLine line : header.getFormatHeaderLines()) { final String field = line.getID(); final BCF2FieldWriter.GenotypesWriter writer = createGenotypesWriter(header, line, encoder, stringDictionary); add(genotypesWriters, field, writer); } }