Question: Is There A Non-Perl Alternative To Accessing Ensembl'S Api?
14
gravatar for Rvidal
5.4 years ago by
Rvidal270
Kingston, Canada
Rvidal270 wrote:

I'm looking for a programmatic way to access Ensembl or UCSC's genome browser using something like python or ruby. Perl is just not my thing, sadly. PyCogent seems to have something that I have not yet tested properly, but just wanted to ping the community before going ahead and coding something that might already exist.

Any ideas?

genome ensembl biopython python • 4.1k views
ADD COMMENTlink modified 6 months ago by jeff.hammerbacher80 • written 5.4 years ago by Rvidal270
11
gravatar for Brad Chapman
5.4 years ago by
Brad Chapman8.7k
Boston, MA
Brad Chapman8.7k wrote:

The two ones I know under current development are PyCogent:

http://pycogent.sourceforge.net/examples/query_ensembl.html

and pygr:

http://github.com/mkszuba/pygr/blob/master/doc/rest/tutorials/ucsc_ensembl.rst

I haven't played with either but both look useful.

ADD COMMENTlink written 5.4 years ago by Brad Chapman8.7k

Thanks Brad. I'm rather intrigued by the fact that biopython doesn't have anything for this. You know if anything is planned or discussed? Can't seem to find anything.

ADD REPLYlink written 5.4 years ago by Rvidal270

SeeĀ https://github.com/biopython/biopython/issues/512

ADD REPLYlink written 4 months ago by Peter4.8k

Ricardo; I'd prefer to see integration of these libraries with Biopython instead of reimplementing. We have PyCogent Ensembl targeted as part of our Google Summer of Code ideas:

http://biopython.org/wiki/Google_Summer_of_Code#Biopython_and_PyCogent_interoperability

I'd be interested in hearing how they work out for you since I haven't had a need to use them in my work yet.

ADD REPLYlink written 5.4 years ago by Brad Chapman8.7k

Maybe I should apply for that project :) Sounds interesting.

ADD REPLYlink written 5.4 years ago by Rvidal270

Slightly off topic, but it surprises me how slow the Perl API is in comparison to other methods. I'm using Python and MySQLdb to directly query the MySQL database for some things and it's lightening fast in comparison to getting the same information using Perl. I can download information from 5 genomes in a fraction of the time it takes me to download 1 using Perl. Looking forward to see what PyCogent and PyGr can do for Ensembl using Biopython :)

ADD REPLYlink written 5.1 years ago by Steve Moss2.0k
4
gravatar for Ian Simpson
5.4 years ago by
Ian Simpson890
Edinburgh
Ian Simpson890 wrote:

I looked into this myself before I resigned myself to using the Perl APIs. I wouldn't be too down on them as they have a lot of functionality (but still depend on BioPerl1.5 !).

You can access the Ensembl database directly through their MySQL server, but building the queries for the very complex schema is very time consuming. I can see them coming under increasing pressure to provide support for other languages (Python certainly would be very popular) but they have a lot of work to do as it is and I think an initiative like that would probably require extra funding.

You can access the MySQL server using the details here http://www.ensembl.org/info/data/mysql.html

ADD COMMENTlink written 5.4 years ago by Ian Simpson890

I think the PyCogent method is exactly this. They have built a wrapper that takes advantage of the MySQL server access.

ADD REPLYlink written 5.4 years ago by Rvidal270
3
gravatar for Neilfws
5.4 years ago by
Neilfws45k
Sydney, Australia
Neilfws45k wrote:

Jan has written Ruby libraries for both Ensembl and UCSC APIs. Here is his original blog post on the Ensembl library.

There is certainly a lot of scope for writing libraries. However, I tend to agree with Ian: sometimes, when a working tool already exists, it's better to just swallow your disdain and work out how to use it.

ADD COMMENTlink written 5.4 years ago by Neilfws45k
2
gravatar for Giovanni M Dall'Olio
5.4 years ago by
London, UK
Giovanni M Dall'Olio21k wrote:

In theory, you could try to use the Ensembl Java APIs with Python throught the Jython interpreter. However, I don't recommend you that, for you sanity.

I follow the pygr's mailing list and they have released a new tutorial on their Ensembl APIs lately, which means that they are stil developing that part. However, I have never tried that module, when I looked at it one year ago it didn's seem complete yet, I am not sure whether it is complete or not now.

ADD COMMENTlink written 5.4 years ago by Giovanni M Dall'Olio21k

I believe the Ensembl Java APIs still work, but they have officially been dropped (unless someone else outside Ensembl has picked them up). As you imply I wouldn't rely on them for developing code.

ADD REPLYlink written 5.4 years ago by Ian Simpson890

I forgot to say that for most of the things you can use Biomart instead of the ensembl APIs. It works a lot better and I suppose it is the reason why the perl APIs are not maintained properly. There are a lot of libraries for biomart, in R, java, etc...

ADD REPLYlink written 5.4 years ago by Giovanni M Dall'Olio21k
2
gravatar for jeff.hammerbacher
6 months ago by
United States
jeff.hammerbacher80 wrote:

Our lab recently released PyEnsembl to work with Ensembl data locally. We also wrote a blog post with some information on how to use the library.

ADD COMMENTlink written 6 months ago by jeff.hammerbacher80
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 382 users visited in the last hour