Class Gff3BaseData

java.lang.Object
htsjdk.tribble.gff.Gff3BaseData
All Implemented Interfaces:
Locatable

public class Gff3BaseData extends Object implements Locatable
  • Constructor Details

  • Method Details

    • equals

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

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

      public String getContig()
      Description copied from interface: Locatable
      Gets the contig name for the contig this is mapped to. May return null if there is no unique mapping.
      Specified by:
      getContig in interface Locatable
      Returns:
      name of the contig this is mapped to, potentially null
    • getSource

      public String getSource()
    • getType

      public String getType()
    • getStart

      public int getStart()
      Specified by:
      getStart in interface Locatable
      Returns:
      1-based start position, undefined if getContig() == null
    • getEnd

      public int getEnd()
      Specified by:
      getEnd in interface Locatable
      Returns:
      1-based closed-ended position, undefined if getContig() == null
    • getScore

      public double getScore()
    • getStrand

      public Strand getStrand()
    • getPhase

      public int getPhase()
    • getAttributes

      public Map<String,List<String>> getAttributes()
    • getAttribute

      public List<String> getAttribute(String key)
      get the values as List for the key, or an empty list if this key is not present
      Parameters:
      key - key whose presence in this map is to be tested
      Returns:
      the values as List, or an empty list if this key is not present
    • hasAttribute

      public boolean hasAttribute(String key)
      Returns true if this record contains an attribute for the specified key.
      Parameters:
      key - key whose presence in this map is to be tested
      Returns:
      true if this map contains an attribute for the specified key
    • getUniqueAttribute

      public Optional<String> getUniqueAttribute(String key)
      Most attributes in a GFF file are present just one time in a line, e.g. : gene_biotype, gene_name, etc ... This function returns an Optional.empty if the key is not present, an Optional.of(value) if there is only one value associated to the key, or it throws an IllegalArgumentException if there is more than one value.
      Parameters:
      key - key whose presence in the attributes is to be tested
      Returns:
      Optional<String> if this map contains zero or one attribute for the specified key
      Throws:
      IllegalArgumentException - if there is more than one value
    • getId

      public String getId()
    • getName

      public String getName()
    • getAliases

      public List<String> getAliases()