Package htsjdk.tribble.gff
Class Gff3FeatureImpl
java.lang.Object
htsjdk.tribble.gff.Gff3FeatureImpl
- All Implemented Interfaces:
Locatable
,Feature
,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"
-
Constructor Summary
ConstructorsConstructorDescriptionGff3FeatureImpl
(Gff3BaseData baseData) Gff3FeatureImpl
(String contig, String source, String type, int start, int end, Double score, Strand strand, int phase, Map<String, List<String>> attributes) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCoFeature
(Gff3FeatureImpl coFeature) Add a feature as a coFeature of this feature.void
addParent
(Gff3FeatureImpl parent) boolean
flatten()
flatten this feature and all descendents into a set of featuresGet set of all features this feature descends from, through chains of Parent attributes.Get BaseData object which contains all the basic information of the featureGets set of features for which this feature is a parentGet set of co-features.Get set of all features descended from this features, through chains of Parent attributes.Gets set of parent featuresGet the set of top level features from which this feature is descendedboolean
boolean
int
hashCode()
boolean
boolean
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface htsjdk.tribble.gff.Gff3Feature
getAliases, getAttribute, getAttributes, getContig, getEnd, getID, getName, getPhase, getScore, getSource, getStart, getStrand, getType
Methods inherited from interface htsjdk.samtools.util.Locatable
contains, contigsMatch, getLengthOnReference, overlaps, withinDistanceOf
-
Constructor Details
-
Gff3FeatureImpl
-
Gff3FeatureImpl
-
-
Method Details
-
getTopLevelFeatures
Get the set of top level features from which this feature is descended- Specified by:
getTopLevelFeatures
in interfaceGff3Feature
- Returns:
- set of top level feature from which this feature is descended
-
isTopLevelFeature
public boolean isTopLevelFeature()- Specified by:
isTopLevelFeature
in interfaceGff3Feature
-
getParents
Gets set of parent features- Specified by:
getParents
in interfaceGff3Feature
- Returns:
- set of parent features
-
getChildren
Gets set of features for which this feature is a parent- Specified by:
getChildren
in interfaceGff3Feature
- Returns:
- set of child features
-
getBaseData
Description copied from interface:Gff3Feature
Get BaseData object which contains all the basic information of the feature- Specified by:
getBaseData
in interfaceGff3Feature
- Returns:
-
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 interfaceGff3Feature
- Returns:
- set of ancestor features
-
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 interfaceGff3Feature
- Returns:
- set of descendents
-
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 interfaceGff3Feature
- Returns:
- set of co-features
-
hasParents
public boolean hasParents()- Specified by:
hasParents
in interfaceGff3Feature
-
hasChildren
public boolean hasChildren()- Specified by:
hasChildren
in interfaceGff3Feature
-
hasCoFeatures
public boolean hasCoFeatures()- Specified by:
hasCoFeatures
in interfaceGff3Feature
-
addParent
-
addCoFeature
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
-
equals
-
hashCode
public int hashCode() -
flatten
flatten this feature and all descendents into a set of features- Specified by:
flatten
in interfaceGff3Feature
- Returns:
- set of this feature and all descendents
-