Class Gff3FeatureImpl

  • All Implemented Interfaces:
    Locatable, Feature, Gff3Feature

    public class Gff3FeatureImpl
    extends Object
    implements Gff3Feature
    Gff3 format spec is defined at https://github.com/The-Sequence-Ontology/Specifications/blob/31f62ad469b31769b43af42e0903448db1826925/gff3.md Discontinuous features which are split between multiple lines in the gff files are implemented as separate features linked as "co-features"
    • Method Detail

      • getTopLevelFeatures

        public Set<Gff3FeatureImpl> getTopLevelFeatures()
        Get the set of top level features from which this feature is descended
        Specified by:
        getTopLevelFeatures in interface Gff3Feature
        Returns:
        set of top level feature from which this feature is descended
      • getBaseData

        public Gff3BaseData getBaseData()
        Description copied from interface: Gff3Feature
        Get BaseData object which contains all the basic information of the feature
        Specified by:
        getBaseData in interface Gff3Feature
        Returns:
      • getAncestors

        public Set<Gff3FeatureImpl> getAncestors()
        Get set of all features this feature descends from, through chains of Parent attributes. Derives_From can be used to specify a particular inheritance path for this feature when multiple paths are available
        Specified by:
        getAncestors in interface Gff3Feature
        Returns:
        set of ancestor features
      • getDescendents

        public Set<Gff3FeatureImpl> getDescendents()
        Get set of all features descended from this features, through chains of Parent attributes. Derives_From can be used to specify a particular inheritance path for this feature when multiple paths are available
        Specified by:
        getDescendents in interface Gff3Feature
        Returns:
        set of descendents
      • getCoFeatures

        public Set<Gff3FeatureImpl> getCoFeatures()
        Get set of co-features. Co-features correspond to the other lines in the gff file that together make up a single discontinuous feature
        Specified by:
        getCoFeatures in interface Gff3Feature
        Returns:
        set of co-features
      • addCoFeature

        public void addCoFeature​(Gff3FeatureImpl coFeature)
        Add a feature as a coFeature of this feature. When this method is called, the input coFeature will also be added as a coFeature of all the other coFeatures of this object, and this feature and all coFeatures will be added as coFeatures of the input coFeature. All coFeatures must have equal IDs and parents.
        Parameters:
        coFeature - feature to add as this features coFeature
      • hashCode

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

        public Set<Gff3FeatureImpl> flatten()
        flatten this feature and all descendents into a set of features
        Specified by:
        flatten in interface Gff3Feature
        Returns:
        set of this feature and all descendents