|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.biojava.bio.seq.db.IndexedSequenceDB
This class reads in a file or a set of files containing sequence data. It contains methods for automatically indexing these sequences.
Method Summary | |
void |
addFile(java.io.File seqFile)
Add sequences from a file to the sequence database. |
static IndexedSequenceDB |
createDB(java.lang.String name,
java.io.File indexFile,
SequenceFormat format,
SequenceFactory sFact,
SymbolParser symParser,
IDMaker idMaker)
Create a sequence database |
java.util.Set |
getFiles()
Retrieve an unmodifiable set of files. |
java.lang.String |
getName()
Get the name of this sequence database. |
Sequence |
getSequence(java.lang.String id)
Retrieve a single sequence by its id. |
java.util.Set |
ids()
Get an imutable set of all of the IDs in the database. |
static IndexedSequenceDB |
openDB(java.io.File indexFile)
Open an index at indexFile. |
void |
removeFile(java.io.File seqFile)
Remove a file from the database |
SequenceIterator |
sequenceIterator()
Returns a SequenceTterator over all sequences in the database. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public static IndexedSequenceDB openDB(java.io.File indexFile) throws java.io.IOException, BioException
If indexFile exists, it will just load the indexes from there. If it does not exist, a new index file will be created.
the
- File to use for persistantly storing the indexespublic static IndexedSequenceDB createDB(java.lang.String name, java.io.File indexFile, SequenceFormat format, SequenceFactory sFact, SymbolParser symParser, IDMaker idMaker) throws java.io.IOException, BioException
name
- a name for the databaseindexFile
- the indexed file of sequencesformat
- the kind of format being read in e.g. EMBL/FASTAsFact
- the sequence factory object for generating sequence objects from the file.symParser
- the SymbolParser object for the sequences read in e.g. DNA or RNA parsers.idMaker
- sets the idMaker to map the set of sequences encountered.public java.util.Set getFiles()
public void addFile(java.io.File seqFile) throws java.io.IOException, BioException
seqFile
- the file containing the sequence or set of sequencespublic void removeFile(java.io.File seqFile) throws java.io.IOException
seqFile
- the file to removepublic java.lang.String getName()
public Sequence getSequence(java.lang.String id) throws BioException
the
- id to retrieve bypublic SequenceIterator sequenceIterator()
public java.util.Set ids()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |