Question: Map uniprot entry name to accession number
1
gravatar for Diego Diez
3.4 years ago by
Diego Diez750
Japan
Diego Diez750 wrote:

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 • 509 views
ADD COMMENTlink modified 3.4 years ago by Mike Smith4.0k • written 3.4 years ago by Diego Diez750
Answer: Map uniprot entry name to accession number
4
gravatar for Mike Smith
3.4 years ago by
Mike Smith4.0k
EMBL Heidelberg / de.NBI
Mike Smith4.0k wrote:

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 COMMENTlink modified 3.4 years ago • written 3.4 years ago by Mike Smith4.0k

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 REPLYlink written 3.4 years ago by Diego Diez750
Please log in to add an answer.

Help
Access

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