This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Sending multiple REST commands over the same URL connection

Hello,

I am using Ensemble REST API to retrieve genomic coordinates based on positions in CDNA transcripts. The retrieval works, but it is very slow since I am doing it for thousands and millions of positions.

Is there an easy way to speed it up? can i send multiple requests over the same REST command or URL connection?

I am using JAVA and following the example given in Ensemble REST API documentation.

Thanks, Yaron

rest api ensembl

Thanks for the reply.

So, is there another efficient way to convert cDNA positions to genomic coordinates?

3 answers

Generally, you can't, unless the specific API endpoint provides a method for such bulk requests. For some endpoints, the Ensembl REST API provides a POST method that allows such bulk queries. However, that's actually not very RESTful, since POST requests should usually result in the creation of some entity.

Thanks for the reply.

So, is there another efficient way to convert cDNA positions to genomic coordinates?

Instead of using remote REST requests, you might look at tools like BLAT or similar to do alignments in bulk on your own system. I think you can do multiple requests to a local BLAT server, using UCSC's server as a test. If that works, you can set up a local server and run the searches you need with fewer restrictions.

The best solution in my view would be to use a local copy of the EnsEMBL MySQL database and query it with the perl API.

Log in to answer this question.