Package htsjdk.variant.vcf
Class VCFStandardHeaderLines
- java.lang.Object
-
- htsjdk.variant.vcf.VCFStandardHeaderLines
-
public class VCFStandardHeaderLines extends Object
Manages header lines for standard VCFINFO
andFORMAT
fields. Provides simple mechanisms for 1) registering standard lines, 2) looking them up, and 3) adding them to headers.- Since:
- 6/12
-
-
Constructor Summary
Constructors Constructor Description VCFStandardHeaderLines()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<String>
addStandardFormatLines(Set<VCFHeaderLine> headerLines, boolean throwErrorForMissing, String... IDs)
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
static Set<String>
addStandardInfoLines(Set<VCFHeaderLine> headerLines, boolean throwErrorForMissing, String... IDs)
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
.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.
-
-
-
Method Detail
-
repairStandardHeaderLines
public 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.
-
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
public static VCFFormatHeaderLine getFormatLine(String ID, boolean throwErrorForMissing)
Returns the standard format line forID
. If none exists, return null or throw an exception, depending onthrowErrorForMissing
.
-
getFormatLine
public static VCFFormatHeaderLine getFormatLine(String ID)
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
public static VCFInfoHeaderLine getInfoLine(String ID, boolean throwErrorForMissing)
Returns the standard info line forID
. If none exists, returnnull
or throw aTribbleException
, depending onthrowErrorForMissing
.
-
getInfoLine
public static VCFInfoHeaderLine getInfoLine(String ID)
Returns the standard info line forID
. If none exists throw aTribbleException
.
-
-