Make a copy of the specified feature. The mappings in the userMap() HashMap
are copied, so each feature has independent user data. Note, however, that the
actual objects in the HashMap are shared (not copied), so a change to such an object may
affect multiple features.
Get frame (aka phase). (GFF field 8). Specifies the offset of the
first nucleotide of the first in-frame codon, assuming this feature
is a dna/rna sequence that codes
for a protein. If you
intend to use this field, you probably want to look it up on the web first.
Get the string of key/value attributes. (GFF field 9). The format and
meaning of this field varies from flavor to flavor of GFF/GTF. This method
simply returns the whole string. Other methods in this class make assumptions
about its format and provide additional utility.
Get HashMap of user data. Each Feature object has a Java HashMap object
which can be used to annotate the Feature. JavaGene does not use or interpret
the keys or values. The values can be any subtype of the Java Object class.
If a Feature is constructed from data fields, the initial HashMap has no mappings (is empty).
If a Feature is constructed from another Feature, a copy of the mappings is made.
Note that the Objects in the copied mapping are shared, even though the mapping itself
is copied (not shared). Thus removing or adding a mapping to one Feature will not affect the
other, but changing an Object which is part of an established mapping may affect both Features.
Get value of specified attribute key. Returns null if the attribute key has no value (does not exist).
Keys are case-sensitive. Assumes attributes are correctly formatted in GFF style.
Known bug: a semicolon within a quoted value will cause parse failure.
Get the first item (everything before first semicolon, if it has one)
in the attribute field, which is assumed to
be a group identifer. This is appropriate for GFF1 files and variants. It is not
appropriate for GTF and GFF2 files, although they may use a named attribute key,
such as "gene_id" or "transcript_id", for grouping.