Package org.biojava.bio.seq.db
Class NCBISequenceDB
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojava.bio.seq.db.WebSequenceDB
org.biojava.bio.seq.db.NCBISequenceDB
- All Implemented Interfaces:
SequenceDBLite,Changeable
- Author:
- Matthew Pocock, Mark Schreiber
-
Field Summary
FieldsFields inherited from interface org.biojava.bio.seq.db.SequenceDBLite
SEQUENCES -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor, querys the Genbank nucleotide database on "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi" and retrieves sequences in FastaFormat.NCBISequenceDB(String server, String CGI, String database, SequenceFormat format) Parameterized constructorNCBISequenceDB(String database, SequenceFormat format) Parameterized constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected URLgetAddress(String uid) protected AlphabetgetName()Get the name of this sequence database.voidsetDatabase(String dataBase) voidsetSequenceFormat(SequenceFormat format) Methods inherited from class org.biojava.bio.seq.db.WebSequenceDB
addSequence, getSequence, 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, removeChangeListener
-
Field Details
-
DB_NUCLEOTIDE
- See Also:
-
DB_PROTEIN
- See Also:
-
-
Constructor Details
-
NCBISequenceDB
public NCBISequenceDB()Default constructor, querys the Genbank nucleotide database on "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi" and retrieves sequences in FastaFormat. -
NCBISequenceDB
Parameterized constructor- Parameters:
database- must be one of "nucleotide" or "protein" (use the static DB fields)format- must be one ofGenbankFormatorFastaFormat- Throws:
BioRuntimeException- if the database or format is invalid
-
NCBISequenceDB
public NCBISequenceDB(String server, String CGI, String database, SequenceFormat format) throws BioRuntimeException Parameterized constructor- Parameters:
server- eg "http://www.ncbi.nlm.nih.gov/"CGI- eg "entrez/query.fcgi"database- must be one of "nucleotide" or "protein" (use the static DB fields)format- must be one ofGenbankFormatorFastaFormat- Throws:
BioRuntimeException- if the database or format is invalid
-
-
Method Details
-
getDataBase
-
setDatabase
- Parameters:
dataBase- must be one of "nucleotide" or "protein" (use the static DB fields)- Throws:
BioException- if an unknown database name is used.
-
getSequenceFormat
- Specified by:
getSequenceFormatin classWebSequenceDB
-
setSequenceFormat
- Parameters:
format- must be one ofFastaFormatorGenbankFormat- Throws:
BioException- if an unknownSequenceFormatis used
-
getAlphabet
- Specified by:
getAlphabetin classWebSequenceDB
-
getAddress
- Specified by:
getAddressin classWebSequenceDB- Throws:
MalformedURLException
-
getName
Description copied from interface:SequenceDBLiteGet the name of this sequence database.- Returns:
- the name of the sequence database, which may be null.
-