|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javagene.seq.Feature
public class Feature
A Feature corresponds to a single row in a GFF file.
Constructor Summary | |
---|---|
Feature(Feature feature)
Make a copy of the specified feature. |
|
Feature(java.lang.String seqname,
java.lang.String source,
java.lang.String type,
Location location,
java.lang.Double score,
int frame,
java.lang.String attributes)
Construct a new Feature from raw data (usually a GFF row). |
Method Summary | |
---|---|
java.lang.String |
attributes()
Get the string of key/value attributes. |
int |
frame()
Get frame (aka phase). |
java.lang.String |
getAttribute(java.lang.String key)
Get value of specified attribute key. |
java.lang.String |
group()
Get the first item (everything before first semicolon, if it has one) in the attribute field, which is assumed to be a group identifer. |
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 location of feature. |
double |
score()
Get score. |
java.lang.String |
seqname()
Get the sequence name. |
java.lang.String |
source()
Get source (aka method). |
java.lang.String |
toString()
A string representation of the feature. |
java.lang.String |
type()
Get feature type, such as "exon" or "CDS". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Feature(Feature feature)
feature
- To clone.public Feature(java.lang.String seqname, java.lang.String source, java.lang.String type, Location location, java.lang.Double score, int frame, java.lang.String attributes)
seqname
- The sequence name field (field 1).source
- The source or method field (field 2).type
- The type of feature field (field 3).location
- The location of the feature. (calculated from GFF start, end and strand fields).score
- The score field (field 7).frame
- The frame or phase field (field 8).attributes
- A string of key/value pairs separated by semicolons (field 9).Method Detail |
---|
public java.lang.String attributes()
public int frame()
public java.lang.String getAttribute(java.lang.String key)
getAttribute
in interface FeatureI
key
- The key.
public java.lang.String group()
group
in interface FeatureI
public boolean hasAttribute(java.lang.String key)
FeatureI
hasAttribute
in interface FeatureI
key
- The key.
public boolean hasAttribute(java.lang.String key, java.lang.String value)
FeatureI
hasAttribute
in interface FeatureI
key
- The key.value
- The value.
public Location location()
location
in interface FeatureI
public double score()
public java.lang.String seqname()
public java.lang.String source()
public java.lang.String toString()
FeatureI
toString
in interface FeatureI
toString
in class java.lang.Object
public java.lang.String type()
type
in interface FeatureI
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |