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.
|
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 Location location()
public double score()
public int frame()
public String attributes()
public HashMap<String,String> userData()
public String getAttribute(String key)
getAttribute
in interface FeatureI
key
- The key.public String getAttributeOld(String key)
public boolean hasAttribute(String key)
FeatureI
hasAttribute
in interface FeatureI
key
- The key.public boolean hasAttribute(String key, String value)
FeatureI
hasAttribute
in interface FeatureI
key
- The key.value
- The value.public String group()
public String toString()
FeatureI
public HashMap<String,String> getAttributes()
getAttributes
in interface FeatureI
Copyright © 2000–2018 BioJava. All rights reserved.