[ensembl-dev] Convert ENSEMBL ID to Uniprot ID by REST

mag mr6 at ebi.ac.uk
Wed Dec 2 10:21:17 GMT 2015


Dear Hao Luo,

There is an endpoint to list available external_db names for a species, 
so you don't have to remember our jargon (*)
http://rest.ensembl.org/documentation/info/external_dbs
It is also possible to filter it using wildcards, something like
http://rest.ensembl.org/info/external_dbs/homo_sapiens?content-type=text/xml;filter=Uniprot%

It is also possible to use wildcard on the xref endpoint, removing the 
need to know exact UniProt syntax
http://rest.ensembl.org/xrefs/id/ENST00000288602?content-type=application/json;external_db=uniprot%;all_levels=1


Hope that helps,
Magali

* Some background on the jargon
Historically, we have distinguished between Swissprot/curated UniProt 
entries (UniProt/SWISSPROT) and Trembl/predicted UniProt 
(UniProt/TREMBL) entries.
These are protein entries, so will be mapped to our Ensembl translations.
Uniprot_gn is our internal way of naming gene symbols obtained via 
UniProt protein mappings.
These are mapped to the Ensembl genes, so will not be returned with the 
all_levels option on a transcript, as this only returns xrefs for the 
transcript and its translation, not the gene.

On 02/12/2015 09:57, Luo Hao wrote:
> Dear all,
> I have a list of ensemble id and want to get Uniprot ID by ENSEMBL ID 
> with ENSEMBL REST API, and use python ensemblrest module.
>
> But when I used xrefs/id/:id/ apt, I am not clear short name of 
> external_db parameter for uniprot.
> For example, the url for uniprot gene name is 
> ok, http://rest.ensembl.org/xrefs/id/ENSG00000135334?content-type=application/json;external_db=uniprot_gn.
> But the result of the url of 
> "http://rest.ensembl.org/xrefs/id/ENST00000288602?content-type=application/json;external_db=uniprot;all_levels=1" 
> is None.
>
> ---------------------------------------------------------------------
> The code of ensenblrest module
> from ensemblrest import EnsemblRest
> ensRest = EnsemblRest()
> ensRest.getXrefsById(id = 'ENSG00000135334', external_db = 'uniprot', 
> all_levels=1)
> ---------------------------------------------------------------------
>
> Could someone tell me the short names of external_db parameters or 
> send me a more detail instruction for REST APT?
>
> Best regards
>
> Hao Luo
>
> Tianjin University
>
> Tianjin, China
>
> Email: hluo at tju.edu.cn 
> <http://mail.tju.edu.cn/jy3/compose/main.jsp?sid=808A-7f8l614-4f74l3lvgwwIGigIl2e&to=hluo%40tju.edu.cn>
>
>
>
>
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20151202/029b5844/attachment.html>


More information about the Dev mailing list