Is there a way to map Uniprot names (e.g. RASH_HUMAN) to other identifiers using Bioconductor? I have tried biomaRt, the AnnotationDbi-based packages and uniprot.ws, but all seem to need accession accession numbers. I had more hope with uniprot.ws since it is possible to do this conversion from the uniprot web site itself.
I don't know whether you can do it with uniprot.ws, but you can query their ID conversion tool directly using the httr package.
library(httr)
results <- POST(url = "http://www.uniprot.org/mapping/",
body = list(from = 'ID',
to = 'ACC',
format = 'tab',
query = 'RASH_HUMAN A4_HUMAN RASH_MOUSE'))
content(results, type = 'text/tab-separated-values', col_names = TRUE, col_types = NULL, encoding = "ISO-8859-1")
From To
1 RASH_HUMAN P01112
2 A4_HUMAN P05067
3 RASH_MOUSE Q61411
Just change the 'to' argument to retrieve a different identifier. The full list they provide is here. I'm not sure you can get back multiple mappings in a single query, so if you want more you might need to run several queries and mash your results back together.
Excellent! I very quickly experimented with httr but seems I didn't really know how to use it. This not only solves my problem but it is educational. Thank you!
Excellent! I very quickly experimented with
httr
but seems I didn't really know how to use it. This not only solves my problem but it is educational. Thank you!How to retrieve the complete list of ID and ACC. No specific query as mentioned here.
Please don't ask questions using years-old posts. Instead post a new question.