spacer
spacer

WSDbfetch (REST)

Description

The dbfetch services1) 2) provide access to entries from various up-to-date biological databases using entry identifiers or accession numbers. There are three main interfaces to dbfetch:

  1. REST: WSDbfetch (REST)

For more information see:

Web service registry entries:

Clients

Sample clients are provided for a number of programming languages. For details of how to use these clients, download the client and run the program without any arguments.

Language Download Requirements
Perl dbfetch_lwp.pl LWP and YAML::Syck
Python dbfetch_urllib2.py urllib2 and xmltramp
Ruby dbfetch_net_http.rb net/http and REXML

Service API

The RESTful form of the WSDbfetch (REST) interface is described here, for the parametrised form, see the Dbfetch URL Syntax guide.

Database Entry

To retrieve an entry in the default database format use a URL of the form:

http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/{db}/{id}

where:

  1. {db} is the database name (e.g. uniprotkb)
  2. {id} is the entry identifier, either an ID (e.g. WAP_RAT) or an accession number (e.g. P01174)

For a list of valid database names see the dbfetch documentation.

For example to fetch WAP_RAT from UniProtKB:

Database Entry with Format

To retrieve an entry in a specified database format use a URL of the form:

http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/{db}/{id}/{format}

where:

  1. {db} is the database name (e.g. uniprotkb)
  2. {id} is the entry identifier either an ID (e.g. WAP_RAT) or an accession number (e.g. P01174)
  3. {format} is the required data format (e.g. uniprotxml)

For a list of valid database and format names see the dbfetch documentation.

For example to fetch WAP_RAT from UniProtKB in UniProtXML format:

Database Entry with Format and Style

To retrieve an entry in a specified database format and result style use a URL of the form:

http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/{db}/{id}/{format}?style={style}

where:

  1. {db} is the database name (e.g. uniprotkb)
  2. {id} is the entry identifier either an ID (e.g. WAP_RAT) or an accession number (e.g. P01174)
  3. {format} is the required data format (e.g. fasta)
  4. {format} is the required result style (e.g. html)

For a list of valid database, data format and result style names see the dbfetch documentation.

For example to fetch WAP_RAT from UniProtKB in fasta sequence format in the HTML style:

Database Information

Details of the databases, formats and styles are available from the service in a range of formats using a URL of the form:

http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/dbfetch.databases?style={style}

The available styles are:

  • html: database information as an XHTML page, as used by the web interface.
  • json: JSON representation for use with JSON based REST clients.
  • xml: XML representation for use with XML based REST clients.
  • yaml: YAML representation for use with YAML based REST clients.

WADL

A WADL3) 4) document describing the WSDbfetch (REST) and dbfetch interfaces can be found at:

Note: due to the wide range of possible response formats for a dbfetch/WSDbfetch call (e.g. EMBL flatfile, EMBLXML, INSDXML, GenBank, UniProtKB flatfile, UniProtKB XML, UniRef XML, UniParc XML, fasta format, etc.) the format of the response cannot be easily specified in the WADL description. For details of the entry formats please see the documentation of the database(s) of interest. If you need to parse the results then you may find bioinformatics tool-kits such as:

Useful for handling the common sequence formats (e.g. fasta format, EMBL, UniProt, GenBank, etc.).

Contact

If you have any questions or comments, or you plan to use this service as part of a course or for a high number of submissions, please contact us EMBL-EBI Support.

1) McWilliam H., Li W., Uludag M., Park Y.M., Buso N., Cowley A.P. and Lopez R. (2013)
Analysis Tool Web Services from the EMBL-EBI.
Nucleic Acids Research 41: W597-W600.
PubMed: 23671338
DOI: 10.1093/nar/gkt376
2) Harte N., Silventoinen V., Quevillon E., Robinson S., Kallio K., Fustero X., Patel P., Jokinen P. and Lopez R. (2004)
Public web-based services from the European Bioinformatics Institute.
Nucleic Acids Research 32: W3-W9.
PubMed: 15215339
DOI: 10.1093/nar/gkh405
 
services/dbfetch_rest.txt · Last modified: 2014/02/24 16:19 by hpm
spacer
spacer