Package htsjdk.variant.vcf
Class VCFContigHeaderLine
java.lang.Object
htsjdk.variant.vcf.VCFHeaderLine
htsjdk.variant.vcf.VCFSimpleHeaderLine
htsjdk.variant.vcf.VCFContigHeaderLine
- All Implemented Interfaces:
VCFIDHeaderLine
,Serializable
,Comparable
A special class representing a contig VCF header line. Knows the true contig order and sorts on that
Note: this class has a natural ordering that is inconsistent with equals()
- See Also:
-
Field Summary
Fields inherited from class htsjdk.variant.vcf.VCFSimpleHeaderLine
DESCRIPTION_ATTRIBUTE, ID_ATTRIBUTE
Fields inherited from class htsjdk.variant.vcf.VCFHeaderLine
ALLOW_UNBOUND_DESCRIPTIONS, serialVersionUID, UNBOUND_DESCRIPTION
-
Constructor Summary
ConstructorsConstructorDescriptionVCFContigHeaderLine
(String line, VCFHeaderVersion version, String key, int contigIndex) create a VCF contig header lineVCFContigHeaderLine
(Map<String, String> mapping, int contigIndex) -
Method Summary
Modifier and TypeMethodDescriptionint
IT IS CRITICAL THAT THIS BE OVERRIDDEN SO WE SORT THE CONTIGS IN THE CORRECT ORDERboolean
Get the SAMSequenceRecord that corresponds to this VCF header line.int
hashCode()
Methods inherited from class htsjdk.variant.vcf.VCFSimpleHeaderLine
getGenericFields, getID, initialize, toStringEncoding
Methods inherited from class htsjdk.variant.vcf.VCFHeaderLine
getKey, getValue, isHeaderLine, shouldBeAddedToDictionary, toString, toStringEncoding
-
Constructor Details
-
VCFContigHeaderLine
create a VCF contig header line- Parameters:
line
- the header lineversion
- the vcf header versionkey
- the key for this header line
-
VCFContigHeaderLine
-
-
Method Details
-
getContigIndex
-
getSAMSequenceRecord
Get the SAMSequenceRecord that corresponds to this VCF header line. If the VCF header line does not have a length tag, the SAMSequenceRecord returned will be set to have a length of SAMSequenceRecord.UNKNOWN_SEQUENCE_LENGTH. Records with unknown length will match any record with the same name when evaluated by SAMSequenceRecord.isSameSequence.- Returns:
- The SAMSequenceRecord containing the ID, length, assembly, and index of this contig. Returns null if the contig header line does not have a length.
-
equals
- Overrides:
equals
in classVCFSimpleHeaderLine
-
hashCode
public int hashCode()- Overrides:
hashCode
in classVCFSimpleHeaderLine
-
compareTo
IT IS CRITICAL THAT THIS BE OVERRIDDEN SO WE SORT THE CONTIGS IN THE CORRECT ORDER- Specified by:
compareTo
in interfaceComparable
- Overrides:
compareTo
in classVCFHeaderLine
-