uniprot rest api

8
http://beta.uniprot.org/ Future official home for UniProt resources. Provides access to data, tools and documentation. Will replace www.ebi.uniprot.org, www.pir.uniprot.org and parts of www.expasy.org by the end of 2007. Simple and efficient REST API, integrated with UI.

Upload: eric-jain

Post on 24-Jun-2015

2.303 views

Category:

Technology


6 download

DESCRIPTION

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

TRANSCRIPT

Page 1: UniProt REST API

http://beta.uniprot.org/

Future official home for UniProt resources. Provides

access to data, tools and documentation.

Will replace www.ebi.uniprot.org, www.pir.uniprot.org

and parts of www.expasy.org by the end of 2007.

Simple and efficient REST API, integrated with UI.

Page 2: UniProt REST API

http://beta.uniprot.org/uniprot/P12345.fasta

data set identifier format

Page 3: UniProt REST API

200 OK

301 Moved Permanently

302 Found

304 Not Modified

400 Bad Request

404 Not Found

410 Gone

500 Internal Server Error

503 Service Unavailable

Page 4: UniProt REST API

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

Page 5: UniProt REST API

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

Page 6: UniProt REST API

require LWP::Simple

my $id = P12345;

my $data = get "http://beta.uniprot.org/uniprot/$id.txt";

...

Page 7: UniProt REST API

import java.net.URL;

String id = "P12345";

URL url = new URL("http://beta.uniprot.org/uniprot/" + id + ".txt");

InputStream in = url.openStream();

...

Page 8: UniProt REST API

http://beta.uniprot.org/uniprot/?query=insulin

data set query

+format, sort, offset, limit, compress...