Question: Retreiving 1:1 orthologs from Ensembl Compara using R Biomart
0
gravatar for asente
7 weeks ago by
asente10
asente10 wrote:

Hello,

Is there a way to retreive Uniprot IDs and cannonical sequences of all 1:1 orthologs for a particular human gene from Ensembl Compara using R BiomaRt using Uniprot ID as a query?

Many thanks.

ADD COMMENTlink modified 7 weeks ago by Emily_Ensembl20k • written 7 weeks ago by asente10
4
gravatar for Emily_Ensembl
7 weeks ago by
Emily_Ensembl20k
EMBL-EBI
Emily_Ensembl20k wrote:

You can't do that in a BioMart query, unfortunately. There are two points where BioMart will not work for you: firstly, it won't allow you to get all the orthologues of a gene, only for a small number of selected species. Secondly, to get the sequences for different species, you will need to run a separate BioMart query for each species, because the sequences and external references are only stored in the BioMart database for their own species.

I would recommend using the Ensembl REST API instead. I would start with the GET xrefs/name/:species/:name endpoint to get the Ensembl gene(s) associated with the UniProt ID. You can then use the Ensembl gene ID as an input for the GET homology/id/:id, which can get you all the orthologues and their aligned sequences. To get their UniProt IDs, you will need to use the GET xrefs/id/:id.

The REST API is language agnostic and can be used in R. There's an online course with Jupyter notebooks to get you started with it. Exercise 3.3 in the course gets orthologues using the endpoint I mentioned so you can copy some code from that.

ADD COMMENTlink modified 7 weeks ago • written 7 weeks ago by Emily_Ensembl20k
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 2.3.0
Traffic: 1002 users visited in the last hour