[ensembl-dev] REST API 'or' question

Andy Yates ayates at ebi.ac.uk
Tue Nov 5 10:40:23 GMT 2013


Hi Matthias,

I've cc'd in the ensembl dev mailing list as hopefully my answer will help others with the same question. The REST homology endpoint allows you to specify more than one target taxon to provide the kind of query you want e.g.

http://beta.rest.ensembl.org/homology/id/ENSG00000157764.json?target_taxon=10090;target_taxon=cow;type=orthologues

This will return the orthologues of human BRAF in mouse and cow in JSON. You can add as many target_taxon attributes as you need. One disadvantage of the REST API is that it is not a batch download system. Should you want all orthologues of human to mouse & cow you would be better served by BioMart.

Hope this helps,

Andy

------------
Andrew Yates - Ensembl Core Software Project Leader
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Wellcome Trust Genome Campus
Hinxton
Cambridge CB10 1SD
Tel: +44-(0)1223-492538
Fax: +44-(0)1223-494468
http://www.ensembl.org/

On 5 Nov 2013, at 10:32, Matthias Ziehm <matthias.ziehm at ebi.ac.uk> wrote:

> Dear Andy,
> 
> Thanks for the the bite-size Talk about the new REST API, like seeing this since I am using python and previously used an outdate inofficial python interface or the biomart homepage.
> I was looking at the homology endpoint and the target_taxon parameter, I was wondering I there a way to specify one or another, i.e something like 7227|10090? (I am interested in a set of 5 species). Of'course I can do seperate targeted queries or non-target restricted queries and filter them locally.
> 
> Thanks,
> Matthias
> 
> -- 
> Matthias Ziehm
> PhD Student - Thornton Group
> EMBL - European Bioinformatics Institute (EBI)
> Wellcome Trust Genome Campus
> Hinxton, Cambridge
> CB10 1SD
> United Kingdom
> 
> Tel. +44 1223 49 2546
> http://www.ebi.ac.uk/~mziehm
> 
> The contents of this email and any attachments are intended for the confidential use of the named recipient(s) only. If you are not the intended recipient, you may only use the e-mail header to process the message. It should be noted that any use of or taking action in reliance upon the content of this e-mail or any attachments by persons or entities other than the intended recipient is prohibited.





More information about the Dev mailing list