Package htsjdk.variant.vcf
Class VCFCompoundHeaderLine
java.lang.Object
htsjdk.variant.vcf.VCFHeaderLine
htsjdk.variant.vcf.VCFCompoundHeaderLine
- All Implemented Interfaces:
VCFIDHeaderLine
,Serializable
,Comparable
- Direct Known Subclasses:
VCFFormatHeaderLine
,VCFInfoHeaderLine
a base class for compound header lines, which include info lines and format lines (so far)
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class htsjdk.variant.vcf.VCFHeaderLine
ALLOW_UNBOUND_DESCRIPTIONS, serialVersionUID, UNBOUND_DESCRIPTION
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
VCFCompoundHeaderLine
(String name, int count, VCFHeaderLineType type, String description, VCFCompoundHeaderLine.SupportedHeaderLineType lineType) create a VCF format header lineprotected
VCFCompoundHeaderLine
(String name, int count, VCFHeaderLineType type, String description, VCFCompoundHeaderLine.SupportedHeaderLineType lineType, String source, String version) create a VCF format header lineprotected
VCFCompoundHeaderLine
(String name, VCFHeaderLineCount count, VCFHeaderLineType type, String description, VCFCompoundHeaderLine.SupportedHeaderLineType lineType) create a VCF format header lineprotected
VCFCompoundHeaderLine
(String name, VCFHeaderLineCount count, VCFHeaderLineType type, String description, VCFCompoundHeaderLine.SupportedHeaderLineType lineType, String source, String version) create a VCF format header lineprotected
VCFCompoundHeaderLine
(String line, VCFHeaderVersion version, VCFCompoundHeaderLine.SupportedHeaderLineType lineType) create a VCF format header line -
Method Summary
Modifier and TypeMethodDescriptionboolean
returns true if we're equal to another compound header lineboolean
int
getCount()
int
Get the number of values expected for this header field, given the properties of VariantContext vc If the count is a fixed count, return that.getID()
getType()
int
hashCode()
boolean
boolean
void
void
Specify annotation sourcevoid
setVersion
(String version) Specify annotation versionprotected String
make a string representation of this header lineMethods inherited from class htsjdk.variant.vcf.VCFHeaderLine
compareTo, getKey, getValue, isHeaderLine, shouldBeAddedToDictionary, toString, toStringEncoding
-
Constructor Details
-
VCFCompoundHeaderLine
protected VCFCompoundHeaderLine(String name, int count, VCFHeaderLineType type, String description, VCFCompoundHeaderLine.SupportedHeaderLineType lineType) create a VCF format header line- Parameters:
name
- the name for this header linecount
- the count for this header linetype
- the type for this header linedescription
- the description for this header linelineType
- the header line type
-
VCFCompoundHeaderLine
protected VCFCompoundHeaderLine(String name, VCFHeaderLineCount count, VCFHeaderLineType type, String description, VCFCompoundHeaderLine.SupportedHeaderLineType lineType) create a VCF format header line- Parameters:
name
- the name for this header linecount
- the count type for this header linetype
- the type for this header linedescription
- the description for this header linelineType
- the header line type
-
VCFCompoundHeaderLine
protected VCFCompoundHeaderLine(String name, int count, VCFHeaderLineType type, String description, VCFCompoundHeaderLine.SupportedHeaderLineType lineType, String source, String version) create a VCF format header line- Parameters:
name
- the name for this header linecount
- the count for this header linetype
- the type for this header linedescription
- the description for this header linelineType
- the header line typesource
- annotation source (case-insensitive, e.g. "dbsnp")version
- exact version (e.g. "138")
-
VCFCompoundHeaderLine
protected VCFCompoundHeaderLine(String name, VCFHeaderLineCount count, VCFHeaderLineType type, String description, VCFCompoundHeaderLine.SupportedHeaderLineType lineType, String source, String version) create a VCF format header line- Parameters:
name
- the name for this header linecount
- the count type for this header linetype
- the type for this header linedescription
- the description for this header linelineType
- the header line typesource
- annotation source (case-insensitive, e.g. "dbsnp")version
- exact version (e.g. "138")
-
VCFCompoundHeaderLine
protected VCFCompoundHeaderLine(String line, VCFHeaderVersion version, VCFCompoundHeaderLine.SupportedHeaderLineType lineType) create a VCF format header line- Parameters:
line
- the header lineversion
- the VCF header versionlineType
- the header line type
-
-
Method Details
-
getID
- Specified by:
getID
in interfaceVCFIDHeaderLine
-
getDescription
-
getType
-
getCountType
-
isFixedCount
public boolean isFixedCount() -
getCount
public int getCount() -
getSource
-
getVersion
-
getCount
Get the number of values expected for this header field, given the properties of VariantContext vc If the count is a fixed count, return that. For example, a field with size of 1 in the header returns 1 If the count is of type A, return vc.getNAlleles - 1 If the count is of type R, return vc.getNAlleles If the count is of type G, return the expected number of genotypes given the number of alleles in VC and the max ploidy among all samples. Note that if the max ploidy of the VC is 0 (there's no GT information at all, then implicitly assume diploid samples when computing G values. If the count is UNBOUNDED return -1- Parameters:
vc
-- Returns:
-
setNumberToUnbounded
public void setNumberToUnbounded() -
toStringEncoding
make a string representation of this header line- Overrides:
toStringEncoding
in classVCFHeaderLine
- Returns:
- a string representation
-
equals
returns true if we're equal to another compound header line- Overrides:
equals
in classVCFHeaderLine
- Parameters:
o
- a compound header line- Returns:
- true if equal
-
hashCode
public int hashCode()- Overrides:
hashCode
in classVCFHeaderLine
-
equalsExcludingDescription
-
sameLineTypeAndName
-
setSource
Specify annotation sourceThis value is optional starting with VCFv4.2.
- Parameters:
source
- annotation source (case-insensitive, e.g. "dbsnp")
-
setVersion
Specify annotation versionThis value is optional starting with VCFv4.2.
- Parameters:
version
- exact version (e.g. "138")
-