[BioRuby] ruby API to ensembl database
Jan Aerts
jan.aerts at gmail.com
Fri Oct 3 17:05:28 UTC 2008
All,
Just to let you know that we updated the Ensembl ruby API so that it also
works for version 50. There are no different APIs for each release of the
database; just mention the release number in your connection. In addition to
core, Francesco Strozzi has been working on the API for the variation
database, the first version of which is now also available.
In addition to the API itself, the latest release also contains an 'ensembl'
executable that will drop you in interactive ruby (irb) already connected to
one of the databases. Just run "ensembl homo_sapiens 50".
Development is on the github site at
http://github.com/jandot/ruby-ensembl-api. The API documentation and
tutorial are at http://www.sanger.ac.uk/Users/ja8/. To install: download the
gem from the github site and run "gem install ruby-ensembl-api-0.9.2.gem".
Small sample of script using the API:
<begin of sample>
DBConnection.connect('homo_sapiens')
slice = Slice.fetch_by_region('chromosome','4',10000,99999,-1)
slice.genes.each do |gene|
puts gene.stable_id + "\t" + gene.status + "\t" + gene.slice.display_name
end
<end of sample>
jan.
More information about the BioRuby
mailing list