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.
Question: Is there a non-perl alternative to accessing Ensembl's API? |
||
6
|
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? |
|
|
| ||
7
|
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. |
|
|
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. 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. 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 :) | ||
4
|
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 |
|
3
|
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. |
|
|
| ||
2
|
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. |
|
|
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. | ||