Class VCFHeaderLine

java.lang.Object
htsjdk.variant.vcf.VCFHeaderLine
All Implemented Interfaces:
Serializable, Comparable
Direct Known Subclasses:
VCFCompoundHeaderLine, VCFSimpleHeaderLine

public class VCFHeaderLine extends Object implements Comparable, Serializable
See Also:
  • Field Details

  • Constructor Details

    • VCFHeaderLine

      public VCFHeaderLine(String key, String value)
      create a VCF header line
      Parameters:
      key - the key for this header line
      value - the value for this header line
  • Method Details

    • getKey

      public String getKey()
      Get the key
      Returns:
      the key
    • getValue

      public String getValue()
      Get the value
      Returns:
      the value
    • shouldBeAddedToDictionary

      public boolean shouldBeAddedToDictionary()
      By default the header lines won't be added to the dictionary, unless this method will be override (for example in FORMAT, INFO or FILTER header lines)
      Returns:
      false
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringEncoding

      protected String toStringEncoding()
      Should be overloaded in sub classes to do subclass specific
      Returns:
      the string encoding
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(Object other)
      Specified by:
      compareTo in interface Comparable
    • isHeaderLine

      public static boolean isHeaderLine(String line)
      Parameters:
      line - the line
      Returns:
      true if the line is a VCF meta data line, or false if it is not
    • toStringEncoding

      public static String toStringEncoding(Map<String,? extends Object> keyValues)
      create a string of a mapping pair for the target VCF version
      Parameters:
      keyValues - a mapping of the key->value pairs to output
      Returns:
      a string, correctly formatted