[ensembl-dev] Retrieving species annotations via REST API

Greg Slodkowicz gregs at ebi.ac.uk
Thu Nov 7 14:21:26 GMT 2013


Hi,
I'm using the REST API (it's great!) to retrieve a few some taxonomical
information and I think I found a minor disrepancy:

When I use the info/species endpoint, I get (among other things) entries
for "canis_familiaris" and "Ancestral sequences".  When I try to feed these
to taxonomy/id/:id<http://beta.rest.ensembl.org/documentation/info/taxonomy_id>,
I get an error (HTTP status code 400).  While I'm not so surprised this
happens with "Ancestral sequences", I'd expect the other one to match.

I got it to work by using "canis lupus familiaris" but since I'm doing this
for many species, ideally I'd like to have an automatic way of extracting
species names.

I noticed that records returned by info/species include an NCBI taxid as
one of the aliases and I was trying to take advantage of that, but it turns
out it's missing from some species (e.g. duck).

Is there a foolproof way of retrieving *all* species in Ensembl and then
fetching taxonomic annotations for them, using the REST API (or a Python
library)?

Best,
Greg


-- 
Greg Slodkowicz
PhD student, Nick Goldman group
European Bioinformatics Institute (EMBL-EBI)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20131107/3ff0a8aa/attachment.html>


More information about the Dev mailing list