<ul><li>http://beta.uniprot.org/ </li></ul><ul><li>Future official home for UniProt resources. Provides access to  data , ...
<ul><li>http ://beta.uniprot.org/uniprot/P12345.fasta </li></ul>data set identifier format
<ul><li>200  OK </li></ul><ul><li>301  Moved Permanently 302  Found 304  Not Modified </li></ul><ul><li>400  Bad Request 4...
<ul><li>GET /uniprot/P12345.rdf HTTP/1.1 Host: beta.uniprot.org HTTP/1.x 200 OK Date: Fri, 01 Jun 2007 09:23:55 GMT Last-M...
<ul><li>GET /uniprot/P12345.rdf HTTP/1.1 Host: beta.uniprot.org If-Modified-Since: Tue, 20 Mar 2007 00:00:00 GMT HTTP/1.x ...
<ul><li>require LWP::Simple </li></ul><ul><li>my $id = P12345; my $data = get &quot;http://beta.uniprot.org/uniprot/$id.tx...
<ul><li>import java.net.URL; </li></ul><ul><li>String id = &quot;P12345&quot;; URL url = new URL(&quot;http://beta.uniprot...
<ul><li>http://beta.uniprot.org/uniprot /?query=insulin </li></ul>data set query +format, sort, offset, limit, compress...
Upcoming SlideShare
Loading in …5
×

UniProt REST API

2,745 views

Published on

Brief talk about programmatic access to http://beta.uniprot.org/ given at the EMBRACE workshop in Geneva, June 1, 2007.

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,745
On SlideShare
0
From Embeds
0
Number of Embeds
50
Actions
Shares
0
Downloads
37
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

UniProt REST API

  1. 1. <ul><li>http://beta.uniprot.org/ </li></ul><ul><li>Future official home for UniProt resources. Provides access to data , tools and documentation . </li></ul><ul><li>Will replace www.ebi.uniprot.org, www.pir.uniprot.org and parts of www.expasy.org by the end of 2007. </li></ul><ul><li>Simple and efficient REST API, integrated with UI. </li></ul>
  2. 2. <ul><li>http ://beta.uniprot.org/uniprot/P12345.fasta </li></ul>data set identifier format
  3. 3. <ul><li>200 OK </li></ul><ul><li>301 Moved Permanently 302 Found 304 Not Modified </li></ul><ul><li>400 Bad Request 404 Not Found 410 Gone </li></ul><ul><li>500 Internal Server Error 503 Service Unavailable </li></ul>
  4. 4. <ul><li>GET /uniprot/P12345.rdf HTTP/1.1 Host: beta.uniprot.org HTTP/1.x 200 OK Date: Fri, 01 Jun 2007 09:23:55 GMT Last-Modified: Tue, 20 Mar 2007 00:00:00 GMT Cache-Control: public Content-Type: application/rdf+xml </li></ul>
  5. 5. <ul><li>GET /uniprot/P12345.rdf HTTP/1.1 Host: beta.uniprot.org If-Modified-Since: Tue, 20 Mar 2007 00:00:00 GMT HTTP/1.x 304 Not Modified Date: Fri, 01 Jun 2007 09:24:15 GMT </li></ul>
  6. 6. <ul><li>require LWP::Simple </li></ul><ul><li>my $id = P12345; my $data = get &quot;http://beta.uniprot.org/uniprot/$id.txt&quot;; ... </li></ul>
  7. 7. <ul><li>import java.net.URL; </li></ul><ul><li>String id = &quot;P12345&quot;; URL url = new URL(&quot;http://beta.uniprot.org/uniprot/&quot; + id + &quot;.txt&quot;); InputStream in = url.openStream(); ... </li></ul>
  8. 8. <ul><li>http://beta.uniprot.org/uniprot /?query=insulin </li></ul>data set query +format, sort, offset, limit, compress...

×