[Biopython] fetch random id
Yvan Strahm
yvan.strahm at bccs.uib.no
Fri Nov 13 19:20:26 UTC 2009
Hello Brad and Peter,
Thanks a lot for the pointers especially the expasy links
Really great
Cheers,
yvan
Brad Chapman wrote:
> Hi Yvan;
>
>> I have to crash test a webservice so was wondering if any one knows a way to
>> get random sequence id from swissprot or genbank?
>
> ExPASy can give you a random SwissProt entry:
>
> http://www.expasy.org/cgi-bin/get-random-entry.pl?S
>
> See the ExPASy documentation for all of their URLs:
>
> http://ca.expasy.org/expasy_urls.html
>
> You can use this to get the UniProt ID from the redirect:
>
>>>> import urllib2
>>>> u = urllib2.urlopen("http://www.expasy.org/cgi-bin/get-random-entry.pl?S")
>>>> u.geturl()
> 'http://www.uniprot.org/uniprot/Q824C8'
>
> Hope this helps,
> Brad
> _______________________________________________
> Biopython mailing list - Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
More information about the Biopython
mailing list