class Bio::Fetch

DESCRIPTION

The Bio::Fetch class provides an interface to dbfetch servers. Given a database name and an accession number, these servers return the associated record. For example, for the embl database on the EBI, that would be a nucleic or amino acid sequence.

Possible dbfetch servers include:

Note that old URL www.ebi.ac.uk/cgi-bin/dbfetch still alives probably because of compatibility, but using the new URL is recommended.

Historically, there were other dbfetch servers including:

But they are unavailable now.

If you’re behind a proxy server, be sure to set your HTTP_PROXY environment variable accordingly.

USAGE

require 'bio'

# Retrieve the sequence of accession number M33388 from the EMBL
# database.
server = Bio::Fetch::EBI.new  #uses EBI server
puts server.fetch('ena_sequence','M33388')

# database name "embl" can also be used though it is not officially listed
puts server.fetch('embl','M33388')

# Do the same thing with explicitly giving the URL.
server = Bio::Fetch.new(Bio::Fetch::EBI::URL)  #uses EBI server
puts server.fetch('ena_sequence','M33388')

# Do the same thing without creating a Bio::Fetch::EBI object.
puts Bio::Fetch::EBI.query('ena_sequence','M33388')

# To know what databases are available on the dbfetch server:
server = Bio::Fetch::EBI.new
puts server.databases

# Some databases provide their data in different formats (e.g. 'fasta',
# 'genbank' or 'embl'). To check which formats are supported by a given
# database:
puts server.formats('embl')