org.biojava.bio.seq.db
Class GenbankSequenceDB

java.lang.Object
  extended byorg.biojava.bio.seq.db.GenbankSequenceDB

public class GenbankSequenceDB
extends Object

This class contains functions accessing DNA sequences in Genbank format.

Author:
Lei Lai, Matthew Pocock, Laurent Jourdren, Shuvankar Mukherjee, Mark Schreiber

Constructor Summary
GenbankSequenceDB()
           
 
Method Summary
 boolean checkException()
           
 boolean checkIOException()
           
protected  URL getAddress(String id)
          Get the URL object for locating sequence object using eutils.
protected  URL getAddress(String id, String format)
          Get the URL object for locating sequence object using eutils.
protected  Alphabet getAlphabet()
           
 String getName()
           
 Sequence getSequence(String id)
           
protected  SequenceFormat getSequenceFormat()
           
 SequenceDB getSequences(Set list)
          Retrieve sequences from a Genbank
 SequenceDB getSequences(Set list, SequenceDB database)
          Retrieve sequences from a Genbank
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenbankSequenceDB

public GenbankSequenceDB()
Method Detail

getSequenceFormat

protected SequenceFormat getSequenceFormat()

getAlphabet

protected Alphabet getAlphabet()

getAddress

protected URL getAddress(String id)
                  throws MalformedURLException
Get the URL object for locating sequence object using eutils. The default value of the return format of the sequence object is text.

Throws:
MalformedURLException

getAddress

protected URL getAddress(String id,
                         String format)
                  throws MalformedURLException
Get the URL object for locating sequence object using eutils. User could specify the return format of the sequence object.

Throws:
MalformedURLException

getName

public String getName()

getSequence

public Sequence getSequence(String id)
                     throws Exception
Throws:
Exception

checkIOException

public boolean checkIOException()

checkException

public boolean checkException()

getSequences

public SequenceDB getSequences(Set list)
                        throws BioException
Retrieve sequences from a Genbank

Parameters:
list - List of NCBI sequence number (GI), accession, accession.version, fasta or seqid.
Returns:
The database object (HashSequenceDB) with downloaded sequences.
Throws:
BioException

getSequences

public SequenceDB getSequences(Set list,
                               SequenceDB database)
                        throws BioException
Retrieve sequences from a Genbank

Parameters:
list - List of NCBI sequence number (GI), accession, accession.version, fasta or seqid.
database - Where to store sequences. if database is null, use an HashSequenceDB Objet.
Returns:
The database object with downloaded sequences.
Throws:
BioException