This is a test version of Biostars. For the public version, visit https://www.biostars.org.
retrieve matched genome/annotation pairs using Ensembl API

I'm trying to figure out a programatic way of downloading genomes and their corresponding annotation files for a large number of species (100s).

I can't seem to find any reference for this in the Ensembl REST API docs. I suppose I could hack together something in Bash to wget from the Ensembl FTP server but I'm wondering if there's a straightforward way that I'm missing.

ensembl rest genome

Currently I'm hoping to use binomial names, although I could probably use any identifier that would work programmatically.

Ensembl is the preferred source—I've used NCBI's utilities in the past which are much more robust, but the annotation pipeline at NCBI is more variable (in my experience), hence the desire for Ensembl's annotation standardization.

Have you looked at NCBI's new DATASETS? There is a command line tool available as well.

This is interesting, and I had not heard of it—thanks! It still doesn't solve the issue, since I'd like to use Ensembl, but a good resource to be aware of.

I don't know if Ensembl API is designed to download genome wide data though I could be wrong. I will ping @Emily from Ensembl.

1 answer

The Ensembl REST API is not designed for anything like that. It should be relatively easy to use the standard paths on the FTP site to script a wget download. You may find it useful to use the info/genomes/division endpoint from the REST API to get the genome names etc that you need in the FTP site locations though.

Log in to answer this question.