Serializable
public class VCFHeader extends Object implements Serializable
Modifier and Type | Class | Description |
---|---|---|
static class |
VCFHeader.HEADER_FIELDS |
Modifier and Type | Field | Description |
---|---|---|
static String |
CONTIG_KEY |
|
static String |
EXCLUDE_INTERVALS_KEY |
|
static String |
HEADER_INDICATOR |
|
static String |
INTERVAL_MERGING_KEY |
|
static String |
INTERVAL_PADDING_KEY |
|
static String |
INTERVAL_SET_RULE_KEY |
|
static String |
INTERVALS_KEY |
|
static String |
METADATA_INDICATOR |
|
static String |
REFERENCE_KEY |
|
static long |
serialVersionUID |
|
static String |
SOURCE_KEY |
Constructor | Description |
---|---|
VCFHeader() |
Create an empty VCF header with no header lines and no samples
|
VCFHeader(VCFHeader toCopy) |
Creates a deep copy of the given VCFHeader, duplicating all its metadata and
sample names.
|
VCFHeader(Set<VCFHeaderLine> metaData) |
create a VCF header, given a list of meta data and auxiliary tags
|
VCFHeader(Set<VCFHeaderLine> metaData,
List<String> genotypeSampleNames) |
|
VCFHeader(Set<VCFHeaderLine> metaData,
Set<String> genotypeSampleNames) |
create a VCF header, given a list of meta data and auxillary tags
|
Modifier and Type | Method | Description |
---|---|---|
void |
addMetaDataLine(VCFHeaderLine headerLine) |
Adds a new line to the VCFHeader.
|
int |
getColumnCount() |
|
List<VCFContigHeaderLine> |
getContigLines() |
|
VCFFilterHeaderLine |
getFilterHeaderLine(String id) |
|
List<VCFFilterHeaderLine> |
getFilterLines() |
|
VCFFormatHeaderLine |
getFormatHeaderLine(String id) |
|
Collection<VCFFormatHeaderLine> |
getFormatHeaderLines() |
Returns the FORMAT HeaderLines in their original ordering
|
List<String> |
getGenotypeSamples() |
get the genotyping sample names
|
Set<VCFHeader.HEADER_FIELDS> |
getHeaderFields() |
get the header fields in order they're presented in the input file (which is now required to be
the order presented in the spec).
|
List<VCFIDHeaderLine> |
getIDHeaderLines() |
|
VCFInfoHeaderLine |
getInfoHeaderLine(String id) |
|
Collection<VCFInfoHeaderLine> |
getInfoHeaderLines() |
Returns the INFO HeaderLines in their original ordering
|
Set<VCFHeaderLine> |
getMetaDataInInputOrder() |
get the meta data, associated with this header, in sorted order
|
Set<VCFHeaderLine> |
getMetaDataInSortedOrder() |
|
VCFHeaderLine |
getMetaDataLine(String key) |
Get the VCFHeaderLine whose key equals key.
|
int |
getNGenotypeSamples() |
|
VCFHeaderLine |
getOtherHeaderLine(String key) |
|
Collection<VCFHeaderLine> |
getOtherHeaderLines() |
Returns the other HeaderLines in their original ordering
|
ArrayList<String> |
getSampleNamesInOrder() |
|
HashMap<String,Integer> |
getSampleNameToOffset() |
|
SAMSequenceDictionary |
getSequenceDictionary() |
Returns the contigs in this VCF file as a SAMSequenceDictionary.
|
VariantContextComparator |
getVCFRecordComparator() |
|
boolean |
hasFilterLine(String id) |
|
boolean |
hasFormatLine(String id) |
|
boolean |
hasGenotypingData() |
do we have genotyping data?
|
boolean |
hasInfoLine(String id) |
|
boolean |
isWriteCommandLine() |
If true, and isWriteEngineHeaders also returns true, the command line will be written to the VCF.
|
boolean |
isWriteEngineHeaders() |
If true additional engine headers will be written to the VCF, otherwise only the walker headers will be output.
|
boolean |
samplesWereAlreadySorted() |
were the input samples sorted originally?
|
void |
setSequenceDictionary(SAMSequenceDictionary dictionary) |
Completely replaces the contig records in this header with those in the given SAMSequenceDictionary.
|
void |
setWriteCommandLine(boolean writeCommandLine) |
If true, and isWriteEngineHeaders also returns true, the command line will be written to the VCF.
|
void |
setWriteEngineHeaders(boolean writeEngineHeaders) |
If true additional engine headers will be written to the VCF, otherwise only the walker headers will be output.
|
String |
toString() |
public static final long serialVersionUID
public static final String METADATA_INDICATOR
public static final String HEADER_INDICATOR
public static final String SOURCE_KEY
public static final String REFERENCE_KEY
public static final String CONTIG_KEY
public static final String INTERVALS_KEY
public static final String EXCLUDE_INTERVALS_KEY
public static final String INTERVAL_MERGING_KEY
public static final String INTERVAL_SET_RULE_KEY
public static final String INTERVAL_PADDING_KEY
public VCFHeader()
public VCFHeader(Set<VCFHeaderLine> metaData)
metaData
- the meta data associated with this headerpublic VCFHeader(VCFHeader toCopy)
public VCFHeader(Set<VCFHeaderLine> metaData, Set<String> genotypeSampleNames)
metaData
- the meta data associated with this headergenotypeSampleNames
- the sample namespublic VCFHeader(Set<VCFHeaderLine> metaData, List<String> genotypeSampleNames)
public void addMetaDataLine(VCFHeaderLine headerLine)
headerLine
- header line to attempt to addpublic List<VCFContigHeaderLine> getContigLines()
public SAMSequenceDictionary getSequenceDictionary()
public void setSequenceDictionary(SAMSequenceDictionary dictionary)
public VariantContextComparator getVCFRecordComparator()
public List<VCFFilterHeaderLine> getFilterLines()
public List<VCFIDHeaderLine> getIDHeaderLines()
public Set<VCFHeader.HEADER_FIELDS> getHeaderFields()
public Set<VCFHeaderLine> getMetaDataInInputOrder()
public Set<VCFHeaderLine> getMetaDataInSortedOrder()
public VCFHeaderLine getMetaDataLine(String key)
key
- public List<String> getGenotypeSamples()
public int getNGenotypeSamples()
public boolean hasGenotypingData()
public boolean samplesWereAlreadySorted()
public int getColumnCount()
public Collection<VCFInfoHeaderLine> getInfoHeaderLines()
public Collection<VCFFormatHeaderLine> getFormatHeaderLines()
public VCFInfoHeaderLine getInfoHeaderLine(String id)
id
- the header key namepublic VCFFormatHeaderLine getFormatHeaderLine(String id)
id
- the header key namepublic VCFFilterHeaderLine getFilterHeaderLine(String id)
id
- the header key namepublic boolean hasInfoLine(String id)
public boolean hasFormatLine(String id)
public boolean hasFilterLine(String id)
public VCFHeaderLine getOtherHeaderLine(String key)
key
- the header key namepublic Collection<VCFHeaderLine> getOtherHeaderLines()
public boolean isWriteEngineHeaders()
public void setWriteEngineHeaders(boolean writeEngineHeaders)
writeEngineHeaders
- true if additional engine headers will be written to the VCFpublic boolean isWriteCommandLine()
public void setWriteCommandLine(boolean writeCommandLine)
writeCommandLine
- true if the command line will be written to the VCF