Tuesday, February 01, 2011

DIY: Running R from within Bioclipse

Important: this blog post is about a development version of Bioclipse, not about the stable 2.4 series. See also Gilleain's comment for this post.

Arvid has done an excellent job in setting up Hudson for Bioclipse, which is not so trivial as for Maven projects. With the R functionality I blogged about earlier today moved to the bioclipse.statistics repository, things are automatically build when new patches hit the repository. And Hudson doesn't just compile the code, it also exports binaries. The main Bioclipse products build can be downloaded here (Windows, Linux, OS/X; if you need more, please let use know). And, all the additional features got automatically uploaded to individual update sites, very much like Maven projects getting pushed to a Maven repository.

So, here's an Bioclipse-R install guide for the adventurous (i.e. Christian, Rajarshi and Rebecca, perhaps Juuso :). I will describe it from a Debian GNU/Linux perspective.

First, make sure you have R and rJava installed. I strongly recommend the versions from sid/unstable (2.12 and 0.8-8), which are more stable here than those from testing:
$ apt-get install r-base-core/sid r-cran-rjava/sid
Then you download the nightly build of Bioclipse 2.5.x from Hudson, e.g. for my 32bit Linux:
$ cd /tmp
$ wget
$ unzip
$ cd Bioclipse.2.5.0.linux.gtk.x86/
But before we boot Bioclipse, we first need to tell it where to find the R instance, and we need to set two variables for that: R_HOME and java.library.path. The latter is set via the bioclipse.ini file, by adding this line to the end:
The other is an environment variable and can be set with:
$ export R_HOME=//usr/lib/R
Then Bioclipse can be started:
$ ./bioclipse
The first thing to do is install the R Feature. To do this open the Install New Software... dialog from the Help menu, and add (with the Add button) the Bioclipse Statistics update site on Hudson at this Location (copy/paste the Location URL into the below dialog):

When back in the Available Software dialog, select the new update site, and mark the Bioclipse-R Integration feature to be installed:

After the install is completed, which will require a reboot of Bioclipse (why?!?!), you can open the R console by opening a dialog from the Window -> Show View -> Other... menu:

The R Console will then show up as view, as depicted in my earlier post.

Loading of libraries, like running library("rcdk") or library("pls"), crashes the whole thing if you use R and rJava from Debian testing, and silently fails with those from unstable. It's on my agenda.


  1. Hmmm. Trying this, got as far as downloading the latest bioclipse - what's with the horrid red square icon?

    I know, I know, ask Uppsala...

  2. A regression indeed... I also have that when running from Eclipse... I haven't reported it yet, though.

  3. Oh, another thing is that if you download bioclipse.product, you may well bet a bioclipse that doesn't do very much :)

    Anyone also finding themselves in this position should install other features/plugins/whatever like R using other pele.../hudson/....$PLUGIN/site.p2 urls.


  4. great! Written a guide how to do it from source (on a mac)

  5. @Gilleain: Arvid is working on an aggregated update site... The first 2.5 developers release is scheduled for March, so this is all pretty new stuff. I should add that as a warning to my post...