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 ofIDswithout standard descriptions, unlessthrowErrorForMissingis true, in which case this situation results in aTribbleExceptionstatic 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 inIDsto header, returning the set of IDs without standard descriptions, unlessthrowErrorForMissingis true, in which case this situation results in aTribbleException.static VCFFormatHeaderLinegetFormatLine(String ID)Returns the standard format line forID.static VCFFormatHeaderLinegetFormatLine(String ID, boolean throwErrorForMissing)Returns the standard format line forID.static VCFInfoHeaderLinegetInfoLine(String ID)Returns the standard info line forID.static VCFInfoHeaderLinegetInfoLine(String ID, boolean throwErrorForMissing)Returns the standard info line forID.static VCFHeaderrepairStandardHeaderLines(VCFHeader header)Walks over the VCF header and repairs the standard VCF header lines in it, returning a freshly allocatedVCFHeaderwith standard VCF header lines repaired as necessary.
-
-
-
Method Detail
-
repairStandardHeaderLines
public static VCFHeader repairStandardHeaderLines(VCFHeader header)
Walks over the VCF header and repairs the standard VCF header lines in it, returning a freshly allocatedVCFHeaderwith 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 ofIDswithout standard descriptions, unlessthrowErrorForMissingis 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 inIDsto header, returning the set of IDs without standard descriptions, unlessthrowErrorForMissingis 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, returnnullor throw aTribbleException, depending onthrowErrorForMissing.
-
getInfoLine
public static VCFInfoHeaderLine getInfoLine(String ID)
Returns the standard info line forID. If none exists throw aTribbleException.
-
-