Constructor | Description |
---|---|
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).
|
Feature(Feature feature) |
Make a copy of the specified feature.
|
Modifier and Type | Method | Description |
---|---|---|
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 |
getAttributeOld(java.lang.String key) |
|
java.util.HashMap<java.lang.String,java.lang.String> |
getAttributes() |
|
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.
|
static void |
main(java.lang.String[] args) |
Deprecated.
|
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".
|
java.util.HashMap<java.lang.String,java.lang.String> |
userData() |
Get HashMap of user data.
|
public Feature(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).public java.lang.String seqname()
public java.lang.String source()
public java.lang.String type()
public Location location()
public double score()
public int frame()
public java.lang.String attributes()
public java.util.HashMap<java.lang.String,java.lang.String> userData()
public java.lang.String getAttribute(java.lang.String key)
getAttribute
in interface FeatureI
key
- The key.public java.lang.String getAttributeOld(java.lang.String key)
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 java.lang.String group()
public java.lang.String toString()
FeatureI
@Deprecated public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public java.util.HashMap<java.lang.String,java.lang.String> getAttributes()
getAttributes
in interface FeatureI