nct.service.sequences
Class DIPSequenceDatabase
java.lang.Object
nct.service.sequences.DIPSequenceDatabase
- All Implemented Interfaces:
- SequenceDatabase
public class DIPSequenceDatabase
- extends java.lang.Object
- implements SequenceDatabase
An implementation of the SequenceDatabase
interface that is
constructed from a DIP fasta file. The assumption is that at least all
of the sequences found in the DIP XIN file will be found in the fasta file.
Method Summary |
boolean |
contains(java.lang.String id)
Determines whether or not the specified id points to a
sequence in the database. |
java.lang.String |
getSequence(java.lang.String id)
Returns the sequence associated with the specified id from
the database. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sequenceMap
protected java.util.Map<java.lang.String,java.lang.String> sequenceMap
synonyms
protected SynonymMapper synonyms
DIPSequenceDatabase
public DIPSequenceDatabase(java.lang.String fastaFile,
SynonymMapper synonyms)
- Parameters:
fastaFile
- The DIP fastaFile with which to create the database.
contains
public boolean contains(java.lang.String id)
- Determines whether or not the specified id points to a
sequence in the database.
- Specified by:
contains
in interface SequenceDatabase
- Parameters:
id
- The id to search for in the database.
- Returns:
- True if the id is found in the database, false otherwise.
getSequence
public java.lang.String getSequence(java.lang.String id)
- Returns the sequence associated with the specified id from
the database.
- Specified by:
getSequence
in interface SequenceDatabase
- Parameters:
id
- The id of the sequence to retrieve from the database.
- Returns:
- A String representation of the sequence found in the database.