Package htsjdk.variant.vcf
Class VCFStandardHeaderLines
java.lang.Object
htsjdk.variant.vcf.VCFStandardHeaderLines
Manages header lines for standard VCF
INFOand
FORMATfields. Provides simple mechanisms for 1) registering standard lines, 2) looking them up, and 3) adding them to headers.
- Since:
- 6/12
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddStandardFormatLines
(Set<VCFHeaderLine> headerLines, boolean throwErrorForMissing, String... IDs) addStandardFormatLines
(Set<VCFHeaderLine> headerLines, boolean throwErrorForMissing, Collection<String> IDs) Adds header lines for each of the format fields in IDs to header, returning the set ofIDs
without standard descriptions, unlessthrowErrorForMissing
is true, in which case this situation results in aTribbleException
addStandardInfoLines
(Set<VCFHeaderLine> headerLines, boolean throwErrorForMissing, String... IDs) addStandardInfoLines
(Set<VCFHeaderLine> headerLines, boolean throwErrorForMissing, Collection<String> IDs) Adds header lines for each of the info fields inIDs
to header, returning the set of IDs without standard descriptions, unlessthrowErrorForMissing
is true, in which case this situation results in aTribbleException
.static VCFFormatHeaderLine
getFormatLine
(String ID) Returns the standard format line forID
.static VCFFormatHeaderLine
getFormatLine
(String ID, boolean throwErrorForMissing) Returns the standard format line forID
.static VCFInfoHeaderLine
getInfoLine
(String ID) Returns the standard info line forID
.static VCFInfoHeaderLine
getInfoLine
(String ID, boolean throwErrorForMissing) Returns the standard info line forID
.static VCFHeader
repairStandardHeaderLines
(VCFHeader oldHeader) Walks over the VCF header and repairs the standard VCF header lines in it, returning a freshly allocatedVCFHeader
with standard VCF header lines repaired as necessary.
-
Constructor Details
-
VCFStandardHeaderLines
public VCFStandardHeaderLines()
-
-
Method Details
-
repairStandardHeaderLines
Walks over the VCF header and repairs the standard VCF header lines in it, returning a freshly allocatedVCFHeader
with standard VCF header lines repaired as necessary. -
addStandardFormatLines
public static Set<String> addStandardFormatLines(Set<VCFHeaderLine> headerLines, boolean throwErrorForMissing, Collection<String> IDs) Adds header lines for each of the format fields in IDs to header, returning the set ofIDs
without standard descriptions, unlessthrowErrorForMissing
is true, in which case this situation results in aTribbleException
-
addStandardFormatLines
public static Set<String> addStandardFormatLines(Set<VCFHeaderLine> headerLines, boolean throwErrorForMissing, String... IDs) -
getFormatLine
Returns the standard format line forID
. If none exists, return null or throw an exception, depending onthrowErrorForMissing
. -
getFormatLine
Returns the standard format line forID
. If none exists, throw anTribbleException
-
addStandardInfoLines
public static Set<String> addStandardInfoLines(Set<VCFHeaderLine> headerLines, boolean throwErrorForMissing, Collection<String> IDs) Adds header lines for each of the info fields inIDs
to header, returning the set of IDs without standard descriptions, unlessthrowErrorForMissing
is true, in which case this situation results in aTribbleException
. -
addStandardInfoLines
public static Set<String> addStandardInfoLines(Set<VCFHeaderLine> headerLines, boolean throwErrorForMissing, String... IDs) -
getInfoLine
Returns the standard info line forID
. If none exists, returnnull
or throw aTribbleException
, depending onthrowErrorForMissing
. -
getInfoLine
Returns the standard info line forID
. If none exists throw aTribbleException
.
-