Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.seq.db
Class GenbankSequenceDB

    java.lang.Object
      org.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, Richard Holland

Field Summary
`protected boolean` | `ExceptionFound`
`protected boolean` | `IOExceptionFound`
`protected static String` | `urlBatchSequences`

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
`protected String` | `makeBatchRequest(URL url, Set list)` Create the Http Post Request to fetch (in batch mode) a list of sequence with Genbank.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### IOExceptionFound

    protected boolean IOExceptionFound

### ExceptionFound

    protected boolean ExceptionFound

### urlBatchSequences

    protected static final String urlBatchSequences

See Also:
  Constant Field Values

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()

### makeBatchRequest

    protected String makeBatchRequest(URL url,
                                      Set list)

  Create the Http Post Request to fetch (in batch mode) a list of sequence with Genbank.

  Parameters:
    `url` - URL of the request
    `list` - List of sequence identifier
  Returns:
    The Post request.

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD