Anyone currently successfully using UniProt REST to map (xref) identifiers?
0
0
Entering edit mode
5.8 years ago

Hey, I can't get UniProts programmatic mapping to only return the requested identifier any more -- rather it returns a list of many associated fields.

My python code from a year or so ago isn't working to map identifiers via UniProts REST service (https://www.uniprot.org/help/api_idmapping). I have been using bioservices (version 1.60) UniProt module, which posts like this:

 params = {'from': fr, 'to': to, 'format': "tab", 'query': query}
 result = self.http_post(url, frmt="txt", data=params)

currently I am populating the params dict: fr : 'ACC' to: 'UPARC' format: 'tab'

and the query a string of space delineated UniProt ACC something like (but not limited to) : "A0A009EAE1 A0A009EAR0 A0A009ED05 A0A009EDB0 A0A009EDZ8 A0A009EGV3 A0A009EJZ5 A0A009EK04" .

Bioservices module chokes because it assumes that the result will only return the from identifier and the 'to'. However, an entire txt formatted table is returned with organism names, etc. I can parse the results myself, but all this extraneous text clogs the REST service. I suspect that the server returns all the fields when it does not recognize the requested 'from', but I've tried many permutations and can't get it right anymore.

Thanks.

gene genome software error • 830 views
ADD COMMENT

Login before adding your answer.

Traffic: 1679 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6