This website allows traditional access for humans using a browser. Simultaneously, it exposes a web resource interface that follows REST principles for a web service allowing programmatic access. It has been designed according to the Resource-Oriented Architecture.
Give the xref in the format 'xdb:xkey', and your browser will be redirected to the appropriate external database web page. The 'xdb' part is not sensitive to character case, while the 'xkey' may be, depending on the external database.
For example, type the xref PDB:1CRP into the search box to the left, and your browser will be redirected to the entry 1CRP in the Protein Data Bank. Similarly, the xref UNIPROT:P01112 will redirect to the P01112 entry in UniProt.
This website can be used programmatically if your programming language has a HTTP library that supports redirection. Use a URL of the form
import urllib2 urltemplate = 'http://www.avatar.se/xref/wr/%s' url = urltemplate % 'PDB:1CRP' resource = urllib2.urlopen(url) print resource.geturl()
This script retrieves the resolved URL for the entry 1CRP in the Protein Data Bank (PDB), the database of macromolecular three-dimensional structures. The 'resource' instance is normally used to read the data, but in this case we wish to print out the resolved URL as returned by the HTTP redirect response from xref/wr.
|xref/wr 0.6 copyright 2007-2008 © Avatar Software AB|