I wrote a rudimental script to scrape the Uniprot Website and extract some information about a list of Uniprot entries. This may be useful as an example on how to query Uniprot (since I couldn’t find any public API nor library), or to get infos about a list a genes of your interest.
NOTE: the correct way to do this is by the Retrieve Tool from the Uniprot page. The script presented in this post is just an example of how to use the python library Mechanize.
The code is available at bitbucket. Usage is simple: edit the files to enter your email address and the list of IDs you are interested in, and run it as a python script.
Enjoy!
Have a look at
http://www.ebi.ac.uk/uniprot/remotingAPI/
and
http://www.ebi.ac.uk/Tools/webservices/
scrape the web site is not a good idea…
Hi Diego,
you are right :-) I think the correct way to do what I was doing is by using the Retrieve option in the home page (http://www.uniprot.org/help/batch).
I will edit the post, so other people looking for the same will see this.