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
public class NCBISequenceDB
- extends WebSequenceDB
- Author:
- Matthew Pocock, Mark Schreiber
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DB_NUCLEOTIDE
public static final String DB_NUCLEOTIDE
- See Also:
- Constant Field Values
DB_PROTEIN
public static final String DB_PROTEIN
- See Also:
- Constant Field Values
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
public NCBISequenceDB(String database,
SequenceFormat format)
- Parameterized constructor
- Parameters:
database - must be one of "nucleotide" or "protein" (use the static DB fields)format - must be one of GenbankFormat or FastaFormat
- 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 of GenbankFormat or FastaFormat
- Throws:
BioRuntimeException - if the database or format is invalid
getDataBase
public String getDataBase()
setDatabase
public void setDatabase(String dataBase)
throws BioException
- Parameters:
dataBase - must be one of "nucleotide" or "protein" (use the static DB fields)
- Throws:
BioException - if an unknown database name is used.
getSequenceFormat
public SequenceFormat getSequenceFormat()
- Specified by:
getSequenceFormat in class WebSequenceDB
setSequenceFormat
public void setSequenceFormat(SequenceFormat format)
throws BioException
- Parameters:
format - must be one of FastaFormat or GenbankFormat
- Throws:
BioException - if an unknown SequenceFormat is used
getAlphabet
protected Alphabet getAlphabet()
- Specified by:
getAlphabet in class WebSequenceDB
getAddress
protected URL getAddress(String uid)
throws MalformedURLException
- Specified by:
getAddress in class WebSequenceDB
- Throws:
MalformedURLException
getName
public String getName()
- Description copied from interface:
SequenceDBLite
- Get the name of this sequence database.
- Returns:
- the name of the sequence database, which may be null.