public class VcfOutputRenderer extends OutputRenderer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL_TRANSCRIPT_DELIMITER
The delimiter to use when separating the information regarding a transcript.
|
static java.lang.String |
DESCRIPTION_PREAMBLE_DELIMITER
The delimiter used between the preamble and the actual fields in the description of the
FUNCOTATOR_VCF_FIELD_NAME attribute i the header. |
static java.lang.String |
END_TRANSCRIPT_DELIMITER
The delimiter to use when ending the information regarding a transcript.
|
static java.lang.String |
FIELD_DELIMITER
The delimiter for each field within the VCF Funcotation field.
|
static java.lang.String |
FUNCOTATOR_VCF_FIELD_NAME
The name of the field inside the VCF INFO field in which to put
Funcotator results. |
static java.lang.String |
HEADER_LISTED_FIELD_DELIMITER
The delimiter in the header for the list of fields that each funcotation has.
|
static java.lang.String |
OTHER_TRANSCRIPT_DELIMITER
The delimiter for the `Other Transcript` field within the Funcotation annotation in the VCF.
|
static java.lang.String |
START_TRANSCRIPT_DELIMITER
The delimiter to use when starting the information regarding a transcript.
|
dataSourceFactories, manualAnnotations, toolVersion
Constructor and Description |
---|
VcfOutputRenderer(htsjdk.variant.variantcontext.writer.VariantContextWriter vcfWriter,
java.util.List<DataSourceFuncotationFactory> dataSources,
htsjdk.variant.vcf.VCFHeader existingHeader,
java.util.LinkedHashMap<java.lang.String,java.lang.String> unaccountedForDefaultAnnotations,
java.util.LinkedHashMap<java.lang.String,java.lang.String> unaccountedForOverrideAnnotations,
java.util.Set<htsjdk.variant.vcf.VCFHeaderLine> defaultToolVcfHeaderLines,
java.util.Set<java.lang.String> excludedOutputFields,
java.lang.String toolVersion)
Create a
VcfOutputRenderer . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the
OutputRenderer . |
void |
write(htsjdk.variant.variantcontext.VariantContext variant,
FuncotationMap txToFuncotationMap)
Write the given
variant and txToFuncotationMap to the output file. |
createFuncotationFromLinkedHashMap, getDataSourceInfoString, getToolVersion
public static final java.lang.String FUNCOTATOR_VCF_FIELD_NAME
Funcotator
results.public static final java.lang.String HEADER_LISTED_FIELD_DELIMITER
public static final java.lang.String FIELD_DELIMITER
public static final java.lang.String OTHER_TRANSCRIPT_DELIMITER
public static final java.lang.String ALL_TRANSCRIPT_DELIMITER
public static final java.lang.String START_TRANSCRIPT_DELIMITER
public static final java.lang.String END_TRANSCRIPT_DELIMITER
public static final java.lang.String DESCRIPTION_PREAMBLE_DELIMITER
FUNCOTATOR_VCF_FIELD_NAME
attribute i the header.public VcfOutputRenderer(htsjdk.variant.variantcontext.writer.VariantContextWriter vcfWriter, java.util.List<DataSourceFuncotationFactory> dataSources, htsjdk.variant.vcf.VCFHeader existingHeader, java.util.LinkedHashMap<java.lang.String,java.lang.String> unaccountedForDefaultAnnotations, java.util.LinkedHashMap<java.lang.String,java.lang.String> unaccountedForOverrideAnnotations, java.util.Set<htsjdk.variant.vcf.VCFHeaderLine> defaultToolVcfHeaderLines, java.util.Set<java.lang.String> excludedOutputFields, java.lang.String toolVersion)
VcfOutputRenderer
.vcfWriter
- a pre-initialized VariantContextWriter
used for writing the output (must not be null).dataSources
- List
of DataSourceFuncotationFactory
to back our annotations (must not be null).existingHeader
- VCFHeader
of input VCF file to preserve (must not be null).unaccountedForDefaultAnnotations
- LinkedHashMap
of default annotations that must be added (must not be null).unaccountedForOverrideAnnotations
- LinkedHashMap
of override annotations that must be added (must not be null).defaultToolVcfHeaderLines
- Lines to add to the header with information about the tool (must not be null).excludedOutputFields
- Fields that should not be rendered in the final output. Only exact name matches will be excluded (must not be null).toolVersion
- The version number of the tool used to produce the VCF file (must not be null).public void close()
OutputRenderer
OutputRenderer
.close
in interface java.lang.AutoCloseable
close
in class OutputRenderer
public void write(htsjdk.variant.variantcontext.VariantContext variant, FuncotationMap txToFuncotationMap)
OutputRenderer
variant
and txToFuncotationMap
to the output file.write
in class OutputRenderer
variant
- VariantContext
to write to the file.txToFuncotationMap
- FuncotationMap
to add to the given variant
on output.