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 URL
getAddress
(String uid) protected Alphabet
getName()
Get the name of this sequence database.void
setDatabase
(String dataBase) void
setSequenceFormat
(SequenceFormat format) Methods inherited from class org.biojava.bio.seq.db.WebSequenceDB
addSequence, getSequence, removeSequence
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 ofGenbankFormat
orFastaFormat
- 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 ofGenbankFormat
orFastaFormat
- 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:
getSequenceFormat
in classWebSequenceDB
-
setSequenceFormat
- Parameters:
format
- must be one ofFastaFormat
orGenbankFormat
- Throws:
BioException
- if an unknownSequenceFormat
is used
-
getAlphabet
- Specified by:
getAlphabet
in classWebSequenceDB
-
getAddress
- Specified by:
getAddress
in classWebSequenceDB
- Throws:
MalformedURLException
-
getName
Description copied from interface:SequenceDBLite
Get the name of this sequence database.- Returns:
- the name of the sequence database, which may be null.
-