Question: Is There A Non-Perl Alternative To Accessing Ensembl'S Api?
8
gravatar for Rvidal
4.1 years ago by
Rvidal210
Kingston, Canada
Rvidal210 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?

ADD COMMENTlink written 4.1 years ago by Rvidal210
9
gravatar for Brad Chapman
4.1 years ago by
Brad Chapman8.1k
Boston, MA
Brad Chapman8.1k 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 4.1 years ago by Brad Chapman8.1k

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 4.1 years ago by Rvidal210

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 4.1 years ago by Brad Chapman8.1k

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

ADD REPLYlink written 4.1 years ago by Rvidal210

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 3.7 years ago by Steve Moss1.9k
4
gravatar for Ian Simpson
4.1 years ago by
Ian Simpson860
Edinburgh
Ian Simpson860 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 4.1 years ago by Ian Simpson860

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

ADD REPLYlink written 4.1 years ago by Rvidal210
3
gravatar for Neilfws
4.1 years ago by
Neilfws41k
Sydney, Australia
Neilfws41k 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 4.1 years ago by Neilfws41k
2
gravatar for Giovanni M Dall'Olio
4.1 years ago by
London, UK
Giovanni M Dall'Olio18k 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 4.1 years ago by Giovanni M Dall'Olio18k

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 4.1 years ago by Ian Simpson860

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 4.1 years ago by Giovanni M Dall'Olio18k
Please log in to add an answer.

Help
Access
  • RSS
  • Stats
  • API

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