Map uniprot entry name to accession number
1
1
Entering edit mode
Diego Diez ▴ 760
@diego-diez-4520
Last seen 3.5 years ago
Japan

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.

uniprot.ws • 3.1k views
ADD COMMENT
4
Entering edit mode
Mike Smith ★ 6.5k
@mike-smith
Last seen 9 hours ago
EMBL Heidelberg

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.

ADD COMMENT
0
Entering edit mode

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!

ADD REPLY
0
Entering edit mode

How to retrieve the complete list of ID and ACC. No specific query as mentioned here.

ADD REPLY
0
Entering edit mode

Please don't ask questions using years-old posts. Instead post a new question.

ADD REPLY

Login before adding your answer.

Traffic: 762 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