Package org.biojava.bio.seq.db
Class AnnotatedSequenceDB
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojava.bio.seq.db.AbstractSequenceDB
org.biojava.bio.seq.db.AnnotatedSequenceDB
- All Implemented Interfaces:
Serializable,SequenceDB,SequenceDBLite,Changeable
SequenceDB implementation which lazily applies a SequenceAnnotator
to sequences retrieved from a SequenceDB.
- Author:
- Thomas Down, Matthew Pocock
- See Also:
-
Field Summary
Fields inherited from interface org.biojava.bio.seq.db.SequenceDBLite
SEQUENCES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SequencedoAnnotation(Sequence seq) Apply the annotation to a sequence.getName()Get the name of this sequence database.Get the original sequenceDB from this annotated sequenceDB.getSequence(String id) Retrieve a single sequence by its id.ids()Get an immutable set of all of the IDs in the database.Returns a SequenceIterator over all sequences in the database.Methods inherited from class org.biojava.bio.seq.db.AbstractSequenceDB
addSequence, filter, removeSequenceMethods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerMethods inherited from interface org.biojava.bio.seq.db.SequenceDB
filterMethods inherited from interface org.biojava.bio.seq.db.SequenceDBLite
addSequence, removeSequence
-
Constructor Details
-
AnnotatedSequenceDB
-
-
Method Details
-
getParent
Get the original sequenceDB from this annotated sequenceDB. -
getName
Description copied from interface:SequenceDBLiteGet the name of this sequence database.- Specified by:
getNamein interfaceSequenceDBLite- Returns:
- the name of the sequence database, which may be null.
-
getSequence
Description copied from interface:SequenceDBLiteRetrieve a single sequence by its id.- Specified by:
getSequencein interfaceSequenceDBLite- Parameters:
id- the id to retrieve by- Returns:
- the Sequence with that id
- Throws:
IllegalIDException- if the database doesn't know about the idBioException- if there was a failure in retrieving the sequence
-
ids
Description copied from interface:SequenceDBGet an immutable set of all of the IDs in the database. The ids are legal arguments to getSequence.- Specified by:
idsin interfaceSequenceDB- Returns:
- a Set of ids - at the moment, strings
-
sequenceIterator
Description copied from interface:SequenceDBReturns a SequenceIterator over all sequences in the database. The order of retrieval is undefined.- Specified by:
sequenceIteratorin interfaceSequenceDB- Overrides:
sequenceIteratorin classAbstractSequenceDB- Returns:
- a SequenceIterator over all sequences
-
doAnnotation
Apply the annotation to a sequence.- Parameters:
seq- the sequence to annotate.- Throws:
BioException
-