Hi, I've got a huge list of Uniprot IDs and I want to get the matching gene names. Do you know how to do that in python ? (I'm currently searching with Biopython...) Thanks !
Yo.
Hi, I've got a huge list of Uniprot IDs and I want to get the matching gene names. Do you know how to do that in python ? (I'm currently searching with Biopython...) Thanks !
Yo.
You can do this using the retrieve function at www.uniprot.org (4th tab element in the top bar)
Upload your list of ID's.
Look for the small blue UniProtKB (number of retrieved) entries link. Click this. Then use the customize display to select only gene names. Then click download as tab.
Ok, not very pythonic, but a few http calls from python would work.
Perhaps sth like this:
for record in SwissProt.parse(open('uniprot_sprot.dat')):
accessions = record.accessions
gene_name = record.gene_name
Chris
Yep. I got what I wanted with this :
url = 'http://www.uniprot.org/mapping/'
query=uniprot_id params = {'from':'ACC','to':'ENSEMBL_ID','format':'tab','query':query} data = urllib.urlencode(params) request = urllib2.Request(url, data) response = urllib2.urlopen(request) page = response.read(200000)
Then I've got an homemade dictionary id_Ensembl <-> geneName
Thanks a lot for your answers guys !
Yo.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
See related post here.