org.biojavax.bio.seq
Interface RichSequence
- All Superinterfaces:
- Annotatable, BioEntry, Changeable, java.lang.Comparable, FeatureHolder, RankedCrossRefable, RichAnnotatable, Sequence, SymbolList
- All Known Implementing Classes:
- SimpleRichSequence, ThinRichSequence
public interface RichSequence
- extends BioEntry, Sequence
A rich sequence is a combination of a org.biojavax.bio.Bioentry
and a Sequence. It inherits and merges the methods
of both. The RichSequence is based on the BioSQL model and
provides a richer array of methods to access information than Sequence
does. Whenever possible RichSequence should be used in preference
to Sequence.
- Since:
- 1.5
- Author:
- Mark Schreiber, Richard Holland
Nested Class Summary |
static class |
RichSequence.IOTools
A set of convenience methods for handling common file formats. |
static class |
RichSequence.Terms
Stores a number of useful terms used across many sequence formats for consistency's sake. |
static class |
RichSequence.Tools
Some useful tools for working with RichSequence objects. |
Method Summary |
boolean |
getCircular()
Is the sequence circular? Circularity has implications for work with locations
and any coordinate work eg symbolAt(int i). |
java.util.Set |
getFeatureSet()
The features for this sequence. |
SymbolList |
getInternalSymbolList()
A special function that returns the SymbolList that this RichSequence is based around. |
java.lang.Double |
getSeqVersion()
The version of the associated symbol list. |
void |
setCircular(boolean circular)
Circularises the Sequence . |
void |
setFeatureSet(java.util.Set features)
Sets the features of this sequence. |
void |
setSeqVersion(java.lang.Double seqVersion)
Sets the version of the associated symbol list. |
Methods inherited from interface org.biojavax.bio.BioEntry |
addComment, addRankedDocRef, addRelationship, getAccession, getComments, getDescription, getDivision, getIdentifier, getName, getNamespace, getRankedDocRefs, getRelationships, getTaxon, getVersion, removeComment, removeRankedDocRef, removeRelationship, setDescription, setDivision, setIdentifier, setTaxon |
Methods inherited from interface java.lang.Comparable |
compareTo |
SYMLISTVERSION
static final ChangeType SYMLISTVERSION
CIRCULAR
static final ChangeType CIRCULAR
getSeqVersion
java.lang.Double getSeqVersion()
- The version of the associated symbol list. Note the use of an object
for the value means that it can be nulled.
- Returns:
- the version
setSeqVersion
void setSeqVersion(java.lang.Double seqVersion)
throws ChangeVetoException
- Sets the version of the associated symbol list. Note the use of an object
for the value means that it can be nulled.
- Parameters:
seqVersion
- the version to set.
- Throws:
ChangeVetoException
- if it doesn't want to change.
getFeatureSet
java.util.Set getFeatureSet()
- The features for this sequence.
- Returns:
- a set of RichFeature objects.
setFeatureSet
void setFeatureSet(java.util.Set features)
throws ChangeVetoException
- Sets the features of this sequence. Note that it is not checked to see if
the features actually belong to this sequence, you'd best check that yourself
and make changes using feature.setParent() if necessary.
- Parameters:
features
- the features to assign to this sequence, replacing all others.
Must be a set of RichFeature objects.
- Throws:
ChangeVetoException
- if they could not be assigned.
setCircular
void setCircular(boolean circular)
throws ChangeVetoException
- Circularises the
Sequence
. The circular length can then be said to be the
length of the sequence itself.
- Parameters:
circular
- set to true if you want it to be circular
- Throws:
ChangeVetoException
- if the change is blocked. Some implementations
may choose not to support circularisation and should throw an exception here.
Some implementations may only support this method for certain Alphabets.
getCircular
boolean getCircular()
- Is the sequence circular? Circularity has implications for work with locations
and any coordinate work eg symbolAt(int i).
Classes that allow it should test this method when working with coordinates or
locations / features.
- Returns:
- true if the this is circular else false.
getInternalSymbolList
SymbolList getInternalSymbolList()
- A special function that returns the SymbolList that this RichSequence is based around.
This should _not_ be the RichSequence object itself, as this function is used to perform
actions on the symbol list without referring to the RichSequence object directly.
- Returns:
- the internal SymbolList of the RichSequence, NOT the RichSequence object itself.