Interface FeatureI

  • All Known Implementing Classes:
    Feature

    public interface FeatureI
    A feature on a sequence (for example, an exon or a gene), defined by a location and a set of attributes encoded as key/value pairs.
    Author:
    Hanno Hinsch
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getAttribute​(java.lang.String key)
      Get the attribute value for this key.
      java.util.HashMap<java.lang.String,​java.lang.String> getAttributes()  
      java.lang.String group()
      Get the group id of the feature.
      boolean hasAttribute​(java.lang.String key)
      Check if the feature has a value defined for the specified key.
      boolean hasAttribute​(java.lang.String key, java.lang.String value)
      Check if the feature attributes include the specified key/value pair.
      Location location()
      Get the location of the feature.
      java.lang.String seqname()
      Get the sequence name.
      java.lang.String toString()
      A string representation of the feature.
      java.lang.String type()
      Get the feature type, for example, "exon", "CDS", etc.
      java.util.HashMap<java.lang.String,​java.lang.String> userData()
      Get HashMap of user data.
    • Method Detail

      • location

        Location location()
        Get the location of the feature.
        Returns:
        The location.
      • group

        java.lang.String group()
        Get the group id of the feature. The group id is defined in the GFF1 format; features that share a common group id are presumed to be part of some logical group. For example, a gene might be represented by several exon features that all share the same group id.

        The exact meaning of a feature's group id, or even its existence, is not guaranteed by this interface. An understanding of a particular file's data format is necessary to properly interpret the group id.
        Returns:
        The group id. This may be an empty string.
      • type

        java.lang.String type()
        Get the feature type, for example, "exon", "CDS", etc.
        Returns:
        The type.
      • seqname

        java.lang.String seqname()
        Get the sequence name.
        Returns:
        Sequence name.
      • getAttribute

        java.lang.String getAttribute​(java.lang.String key)
        Get the attribute value for this key.
        Parameters:
        key - The key.
        Returns:
        The corresponding value. Null if the key has no value defined .
      • hasAttribute

        boolean hasAttribute​(java.lang.String key)
        Check if the feature has a value defined for the specified key.
        Parameters:
        key - The key.
        Returns:
        True if a value is defined for this key.
      • hasAttribute

        boolean hasAttribute​(java.lang.String key,
                             java.lang.String value)
        Check if the feature attributes include the specified key/value pair.
        Parameters:
        key - The key.
        value - The value.
        Returns:
        True if the feature's value for this key matches the specified value.
      • toString

        java.lang.String toString()
        A string representation of the feature.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string.
      • userData

        java.util.HashMap<java.lang.String,​java.lang.String> userData()
        Get HashMap of user data.
        Returns:
        The user HashMap.
      • getAttributes

        java.util.HashMap<java.lang.String,​java.lang.String> getAttributes()