uniprot rest api
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](https://reader036.vdocument.in/reader036/viewer/2022082606/558a6292d8b42a476e8b475e/html5/thumbnails/1.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022082606/558a6292d8b42a476e8b475e/html5/thumbnails/2.jpg)
http://beta.uniprot.org/uniprot/P12345.fasta
data set identifier format
![Page 3: UniProt REST API](https://reader036.vdocument.in/reader036/viewer/2022082606/558a6292d8b42a476e8b475e/html5/thumbnails/3.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022082606/558a6292d8b42a476e8b475e/html5/thumbnails/4.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022082606/558a6292d8b42a476e8b475e/html5/thumbnails/5.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022082606/558a6292d8b42a476e8b475e/html5/thumbnails/6.jpg)
require LWP::Simple
my $id = P12345;
my $data = get "http://beta.uniprot.org/uniprot/$id.txt";
...
![Page 7: UniProt REST API](https://reader036.vdocument.in/reader036/viewer/2022082606/558a6292d8b42a476e8b475e/html5/thumbnails/7.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022082606/558a6292d8b42a476e8b475e/html5/thumbnails/8.jpg)
http://beta.uniprot.org/uniprot/?query=insulin
data set query
+format, sort, offset, limit, compress...