Bioclipse awarded at Trophees du Libre

I just arrived home from the international contest for free software, Trophees du Libre 2007, which was held in Soissons, France. Bioclipse was awarded the Special Prize of the jury, and the prize was handed over by the president of the Free Software Foundation Europe (FSFE), Georg Greeve, who also was the chairman of the jury. It was a great event; great to meet other open source developers and people representing organizations and companies who actively support free software. Apparently we received the Special Prize because we were too famous already :-).


Scripting in Bioclipse 2

Go to WindowShow ViewOther... in the application menu in Bioclipse 2. Under the heading Scripting, we find Groovy Console and Javascript Console. Pick Groovy Console.

groovy> "CCCTCGCCACCTATACCCAG".replace("T","U")
groovy> ["Alanine", "Glutamic Acid", "Methionine", "Tryptophan"].findAll { it.endsWith("ine") }
[Alanine, Methionine]

Performing more integrated Bioclipse actions depends on getting more of the data model done, but the above should give a sense of why command-line scripting is something we want.

Our dream is something along the lines of being able to turn many of the common actions in Bioclipse into pieces of scripts, so that actions can be recorded and saved, much like macros in some applications.

The fact that we now have two scripting engines in net.bioclipse.core spurred some discussion on the channel, which has given me food for thought. I do think the scripting capability in Bioclipse 2 should be built-in to the point of being hard to avoid... but there's nothing that says that this capability needs to be a language engine like Rhino or Groovy. Instead, one could imagine it being an API of some sort.

If that turns out to be the way we do it, neither Rhino nor Groovy need be core. My hope is that we can make things decoupled enough to be able to move them out into separate plugins. But it's too early to tell; still too many unknowns.

Coming up: Ruby!


Bioclipse2 and Spring

Yesterday wasn't a great day for me. I was trying something called Spring-osgi and nothing worked. But I should take it from the beginning or at least a bit earlier.

Spring is a java framework that delivers great features (like Aspect oriented programming) for building java applications. The problem is that Eclipse's plugin structure makes things a little bit more complicated. This is where the Spring-OSGI project enters the scene. The OSGi framework specification forms the basis of the Eclipse Runtime and Spring-osgi is a project for using Spring in an osgi framework. So far so good (in theory). Spring-osgi seems to be a relatively new project and I am not sure that it is mature enough to be a part of Bioclipse 2.

What I tried to get working yesterday was a little mini example Spring service supplied by the Spring osgi project. I failed horribly when it came to running the osgi integration tests.

It would be great to have this in Bioclipse 2 but as things are right now I am not sure it is worth it. We will see what will happend.

First screenshot of Bioclipse2

Yesterday I added the first editor to Bioclipse2, based on Jmol. The major thing now is to adapt everything to Eclipse, and port e.g. ChemTree to Outline View. I will dig into this while Jonathan works on the Spring core functionality, and Carl works on the scripting language and -console.


Adding scripting commands to Bioclipse

Following up on my recent post on Scripting BioMoby in Bioclipse, I have created a new extension point to be able to hook in additions to the Rhino scripting language in Bioclipse with a namespace. Add an example extension like below to the plugin.xml of your plugin (example is from net.bioclipse.biomoby.ui):


The class must implement IScriptProvider and namespace is the desired namespace you like to have (see examples below). An example is the class net.bioclipse.biomoby.ui.scripts.MobyServiceScripting:

public class MobyServiceScripting implements IScriptProvider{

public void showMessage(String title, String message) {


Now it's possible to issue commands in Bioclipse like the following:

  moby.showMessage("wee", "how");

Very convenient in my opinion. This will be extensively used in the upcoming Bioclipse2, which currently is in design phase.


Scripting BioMoby in Bioclipse

I have been working hard on a BioMoby plugin to get BioMoby into Bioclipse. The ultimate goal is to mix and match between local functionality and remote services, and I have created some sample scripts to assist with this. It is not much for the moment but demonstrates how Bioclipse can take advantage of the many services in BioMoby, both in the GUI and in the scripting language (currently based on Rhino).

A sample script that retrieves a sequence from GenBank via a Moby service, and translates it into FASTA-format using the local library BioJava, is provided below.

console = Packages.net.bioclipse.util.BioclipseConsole;
moby = Packages.net.bioclipse.biomoby.ui.scripts.MobyServiceScripting;
biojava = Packages.net.bioclipse.biojava.scripts.BioJavaScripting;



The ouput of the script is:

Calling service...

Read: 1 sequences. Returning first.
>gi|111076|lcl|D31461.0|D31461 T-cell receptor delta chain BDN7, thymus - mouse
Rhino script done.

More information and other sample scripts are available on the net.bioclipse.rhino (formerly bc_rhino) plugin page on the Bioclipse wiki.