| Constructor and Description |
|---|
Feature(Feature feature)
Make a copy of the specified feature.
|
Feature(String seqname,
String source,
String type,
Location location,
Double score,
int frame,
String attributes)
Construct a new Feature from raw data (usually a GFF row).
|
| Modifier and Type | Method and Description |
|---|---|
String |
attributes()
Get the string of key/value attributes.
|
int |
frame()
Get frame (aka phase).
|
String |
getAttribute(String key)
Get value of specified attribute key.
|
String |
getAttributeOld(String key) |
HashMap<String,String> |
getAttributes() |
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(String key)
Check if the feature has a value defined for the specified key.
|
boolean |
hasAttribute(String key,
String value)
Check if the feature attributes include the specified key/value pair.
|
Location |
location()
Get location of feature.
|
static void |
main(String[] args)
Deprecated.
|
double |
score()
Get score.
|
String |
seqname()
Get the sequence name.
|
String |
source()
Get source (aka method).
|
String |
toString()
A string representation of the feature.
|
String |
type()
Get feature type, such as "exon" or "CDS".
|
HashMap<String,String> |
userData()
Get HashMap of user data.
|
public Feature(Feature feature)
feature - Feature to clone.public Feature(String seqname, String source, String type, Location location, Double score, int frame, 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 String seqname()
public String source()
public String type()
public Location location()
public double score()
public int frame()
public String attributes()
public HashMap<String,String> userData()
public String getAttribute(String key)
getAttribute in interface FeatureIkey - The key.public boolean hasAttribute(String key)
FeatureIhasAttribute in interface FeatureIkey - The key.public boolean hasAttribute(String key, String value)
FeatureIhasAttribute in interface FeatureIkey - The key.value - The value.public String group()
public String toString()
FeatureI@Deprecated public static void main(String[] args) throws Exception
Exceptionpublic HashMap<String,String> getAttributes()
getAttributes in interface FeatureICopyright © 2000–2016 BioJava. All rights reserved.