Package org.biojavax.bio.seq
Interface RichSequence
- All Superinterfaces:
Annotatable,BioEntry,Changeable,Comparable,FeatureHolder,RankedCrossRefable,RichAnnotatable,Sequence,SymbolList
- All Known Implementing Classes:
SimpleRichSequence,ThinRichSequence
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, George Waldon
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA set of convenience methods for handling common file formats.static classStores a number of useful terms used across many sequence formats for consistency's sake.static classSome useful tools for working with RichSequence objects.Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable
Annotatable.AnnotationForwarderNested classes/interfaces inherited from interface org.biojava.bio.seq.FeatureHolder
FeatureHolder.EmptyFeatureHolder -
Field Summary
FieldsFields inherited from interface org.biojava.bio.Annotatable
ANNOTATIONFields inherited from interface org.biojavax.bio.BioEntry
COMMENT, DESCRIPTION, DIVISION, IDENTIFIER, RANKEDCROSSREF, RANKEDDOCREF, RELATIONS, SEQVERSION, TAXONFields inherited from interface org.biojava.bio.seq.FeatureHolder
EMPTY_FEATURE_HOLDER, FEATURES, SCHEMAFields inherited from interface org.biojava.bio.symbol.SymbolList
EDIT, EMPTY_LIST -
Method Summary
Modifier and TypeMethodDescriptionbooleanIs the sequence circular?The features for this sequence.A special function that returns the SymbolList that this RichSequence is based around.The version of the associated symbol list.voidsetCircular(boolean circular) Circularises theSequence.voidsetFeatureSet(Set<Feature> features) Sets the features of this sequence.voidsetSeqVersion(Double seqVersion) Sets the version of the associated symbol list.Methods inherited from interface org.biojava.bio.Annotatable
getAnnotationMethods 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, setTaxonMethods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.biojava.bio.seq.FeatureHolder
containsFeature, countFeatures, createFeature, features, filter, filter, getSchema, removeFeatureMethods inherited from interface org.biojavax.RankedCrossRefable
addRankedCrossRef, getRankedCrossRefs, removeRankedCrossRef, setRankedCrossRefsMethods inherited from interface org.biojavax.RichAnnotatable
getNoteSet, getRichAnnotation, setNoteSetMethods inherited from interface org.biojava.bio.symbol.SymbolList
edit, getAlphabet, iterator, length, seqString, subList, subStr, symbolAt, toList
-
Field Details
-
SYMLISTVERSION
-
CIRCULAR
-
-
Method Details
-
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
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
The features for this sequence.- Returns:
- a set of RichFeature objects.
-
setFeatureSet
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
Circularises theSequence. 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
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.
-