[ensembl-dev] Fetching genomic alignments with Ensembl REST API

Andy Yates ayates at ebi.ac.uk
Thu Jan 2 16:15:19 GMT 2014


Hi Greg,

504 means "The server was acting as a gateway or proxy and did not 
receive a timely response from the upstream server". So your request 
could not be full-filled in a reasonable amount of time. I would guess 
that this region is in-fact quite a complex request. Can you shrink down 
your requested region? We use Amazon's ELB as a front-end which has a 
default timeout of 60 seconds. So unless you can shrink the requested 
amount of data down there's no way the beta service can return a 
response.

As for the question about the difference between the two endpoints. So 
the alignment/slice/region endpoint is creating a fake Slice spanning 
your requested region. The alignment is presented as if it were a single 
alignment with gaps. alignment/block/region presents each individual 
alignment block with a tree. The reason why is that for each alignment 
block in an EPO alignment can have a different tree attached and 
different species aligned. So whilst the Slice based endpoint is great 
for getting data out if you don't care about the nitty gritty details 
it's not telling the whole story and could leave you inferring something 
that is incorrect e.g. two regions may appear to be aligned but are in 
fact not.

We have realised this is confusing (both from a data and usage POV) and 
have opted in the next release to retire the Slice based endpoint in 
favour of the blocks view. We are also working on alternatives for 
retrieving the equivalent Slice view data in a way more in-tune with the 
other endpoints.

All the best,

Andy

------------
Andrew Yates - Ensembl Support Coordinator
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 2 Jan 2014, at 12:59, Greg Slodkowicz wrote:

> Hi Ensembl-dev,
> I'm trying to fetch some genomic alignments using the GET
> alignment/slice/region/ endpoint from the REST API but my requests are
> timing out with HTTP response 504.
>
> This is what my request looks like:
> http://beta.rest.ensembl.org/alignment/slice/region/homo_sapiens/1:61330930-61928465:1?species_set_group=mammals
> Am I doing something wrong?
>
> I was also wondering what the difference between 
> alignment/slice/region/
> and alignment/block/region/:species/:region is?
>
> Best,
> Greg
>
> -- 
> Greg Slodkowicz
> PhD student, Nick Goldman group
> European Bioinformatics Institute (EMBL-EBI)
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: 
> http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/




More information about the Dev mailing list