This is a test version of Biostars. For the public version, visit https://www.biostars.org.
GET Ensembl xrefs for multiple queries

Hi,

I'm using Ensembl's rest to obtain xrefs. The example shows how to do this.(I'm using the R option) for a single Ensembl gene ID query, but I'd like to obtain xrefs for all the gene IDs in the GTF.

Is there a way to use the httr GET function that in the example with multiple queries? I see this example for doing so for sequence-related data rather than xref, but changing:

ext <- "/sequence/id"

with:

ext <- "/xrefs/id"

doesn't work.

Any idea if this is possible? Or alternatively, how can I obtain xref data (I'm specifically interested in the EntrezGene and RefSeq xrefs for genes and transcripts, respectively.

ensembl httr api

1 answer

Hi Rubic,

I suggest using the the files available on the Ensembl FTP site that provide mappings between Ensembl genes/transcripts and translations and specific external references (e.g RefSeq): http://ftp.ensembl.org/pub/release-100/tsv/homo_sapiens/

Alternatively, you can use MySQL to query the database directly: https://www.ensembl.org/info/docs/api/core/core_schema.html

Best wishes

Ben

Log in to answer this question.