Package htsjdk.variant.vcf

# Class VCFStandardHeaderLines

java.lang.Object
htsjdk.variant.vcf.VCFStandardHeaderLines

public class VCFStandardHeaderLines extends Object
Manages header lines for standard VCF

    INFO

and

    FORMAT

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

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 of `IDs` without standard descriptions, unless `throwErrorForMissing` is true, in which case this situation results in a `TribbleException`
`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 in `IDs` to header, returning the set of IDs without standard descriptions, unless `throwErrorForMissing` is true, in which case this situation results in a `TribbleException`.
`static VCFFormatHeaderLine`
`getFormatLine(String ID)`
Returns the standard format line for `ID`.
`static VCFFormatHeaderLine`
`getFormatLine(String ID, boolean throwErrorForMissing)`
Returns the standard format line for `ID`.
`static VCFInfoHeaderLine`
`getInfoLine(String ID)`
Returns the standard info line for `ID`.
`static VCFInfoHeaderLine`
`getInfoLine(String ID, boolean throwErrorForMissing)`
Returns the standard info line for `ID`.
`static VCFHeader`
`repairStandardHeaderLines(VCFHeader oldHeader)`
Walks over the VCF header and repairs the standard VCF header lines in it, returning a freshly allocated `VCFHeader` with standard VCF header lines repaired as necessary.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### VCFStandardHeaderLines

public VCFStandardHeaderLines()

## Method Details

### repairStandardHeaderLines

public static VCFHeader repairStandardHeaderLines(VCFHeader oldHeader)
Walks over the VCF header and repairs the standard VCF header lines in it, returning a freshly allocated `VCFHeader` 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 of `IDs` without standard descriptions, unless `throwErrorForMissing` is true, in which case this situation results in a `TribbleException`

### addStandardFormatLines

public static Set<String> addStandardFormatLines(Set<VCFHeaderLine> headerLines, boolean throwErrorForMissing, String... IDs)

See Also:
  - `addStandardFormatLines(java.util.Set, boolean, java.util.Collection)`

### getFormatLine

public static VCFFormatHeaderLine getFormatLine(String ID, boolean throwErrorForMissing)
Returns the standard format line for `ID`. If none exists, return null or throw an exception, depending on `throwErrorForMissing`.

### getFormatLine

public static VCFFormatHeaderLine getFormatLine(String ID)
Returns the standard format line for `ID`. If none exists, throw an `TribbleException`

### addStandardInfoLines

public static Set<String> addStandardInfoLines(Set<VCFHeaderLine> headerLines, boolean throwErrorForMissing, Collection<String> IDs)
Adds header lines for each of the info fields in `IDs` to header, returning the set of IDs without standard descriptions, unless `throwErrorForMissing` is true, in which case this situation results in a `TribbleException`.

### addStandardInfoLines

public static Set<String> addStandardInfoLines(Set<VCFHeaderLine> headerLines, boolean throwErrorForMissing, String... IDs)

See Also:
  - `addStandardFormatLines(java.util.Set, boolean, java.util.Collection)`

### getInfoLine

public static VCFInfoHeaderLine getInfoLine(String ID, boolean throwErrorForMissing)
Returns the standard info line for `ID`. If none exists, return `null` or throw a `TribbleException`, depending on `throwErrorForMissing`.

### getInfoLine

public static VCFInfoHeaderLine getInfoLine(String ID)
Returns the standard info line for `ID`. If none exists throw a `TribbleException`.