Question: Anyone currently successfully using UniProt REST to map (xref) identifiers?
gravatar for Richard Llewellyn
19 months ago by
United States
Richard Llewellyn180 wrote:

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 ( 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.


software error genome gene • 292 views
ADD COMMENTlink written 19 months ago by Richard Llewellyn180
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1401 users visited in the last hour