[BioRuby] combination bioruby and rails

Toshiaki Katayama ktym at hgc.jp
Tue May 9 19:38:45 UTC 2006


Hi Jan,

There will be many possibilities if BioRuby is used with Rails (especially with ActiveRecord).

The GFF database (which is used as a backend of GBrowse) loaded by the bp_load_gff.pl command in BioPerl is also a candidate in addition to the BioSQL.

There are some related efforts have been made, as far as I know.

* Nakao-san developed a Ensembl (Vega?) accessing module with ActiveRecord
* Nikaido-san posted a short Japanese tutorial to build a gene expression database viewer with Rails in his weblog.
* Ichinose-san created AJAX interface for BioRuby (and BioRuby shell)

The point would be, what kind of integration (or how tightly) is ideal, if we integrate Rails *in* BioRuby.


As for the Rails module in bio/shell, it is not finished but can be used in the following way for now:

1. start the bioruby shell in terminal1 and issue 'web' command

  terminal1% bioruby foo
  bioruby> web
  Copying web server files ... done
  DRb::DRbConnError: druby://localhost:81064 - #<Errno::ECONNREFUSED: Connection refused - connect(2)

(my intention is to make this command will take care of following steps automatically, however,)
you may see the DRb::DRbConnError message here, then quit.

  bioruby> quit

2. open another terminal and start the server

  terminal2% cd foo
  terminal2% ruby script/server
  druby://localhost:81064
  starting ...
  => Booting WEBrick...
  => Rails application started on http://0.0.0.0:3000
  => Ctrl-C to shutdown server; call with --help for options

the rails (webrick httpd) server will start.

3. Switch back to terminal1 and restart bioruby session.

  terminal1% bioruby foo
  bioruby> web
  Connected to server druby://localhost:81064
  Open http://localhost:3000/shell/

4. open http://localhost:3000/shell/ in your web browser

the BioRuby logo and the message "Connected!" will be displayed.

5. then create some objects in the bioruby shell.

  bioruby> x = 123
  bioruby> na = seq("atgcatgcatgc")
  bioruby> aa = na.translate

then reload your browser and variables will be listed.
By click on the variable, you may see the contents of the variable in Rails.

This feature is a experimental implementation and I'm not clear what the goal would be.
Do you want to call methods of the object in web interface?
All objects should be stored by ActiveRecord?
What kind of visualization is desired?

Toshiaki


On 2006/05/10, at 3:22, jan aerts (RI) wrote:

> Hi all,
>
> Has anyone tried to integrate bioruby with rails? I noticed that there's a rails module in bio/shell, but couldn't get it working.
> How straightforward would it be to implement a BioSQL-based database with a rails interface? A feature of the web-interface could then be that sequences would be displayed graphically (with features annotated; using SVG?), and that the user could run remote BLASTs right from within the sequence viewer... or something.
>
> Anyone know of any bioruby/rails implementations?
>
> jan.
>
> _______________________________________________
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby




More information about the BioRuby mailing list