2007-11-30
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 :-).
2007-11-22
Scripting in Bioclipse 2
Go to
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
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!
Window
→ Show View
→ Other...
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")
CCCUCGCCACCUAUACCCAG
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!
2007-11-21
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.
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
2007-11-05
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:
Now it's possible to issue commands in Bioclipse like the following:
Very convenient in my opinion. This will be extensively used in the upcoming Bioclipse2, which currently is in design phase.
<extension
point="net.bioclipse.rhino.scripting">
<ScriptContribution
class="net.bioclipse.biomoby.ui.scripts.MobyServiceScripting"
id="net.bioclipse.biomoby.ui.scripts.MobyServiceScripting"
namespace="moby">
</ScriptContribution>
</extension>
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) {
MessageDialog.openInformation(
getShell(),
title,
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.
2007-11-02
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;
prot=moby.downloadGenbank("NCBI_GI","111076");
seq=biojava.parseString(prot);
fasta=biojava.toFasta(seq);
console.writeToConsole(fasta);
The ouput of the script is:
Calling service...
Done.
Read: 1 sequences. Returning first.
>gi|111076|lcl|D31461.0|D31461 T-cell receptor delta chain BDN7, thymus - mouse
ATYFCALMERVSRRGAPDKLVFGQGTQVTVEP
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.
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;
prot=moby.downloadGenbank("NCBI_GI","111076");
seq=biojava.parseString(prot);
fasta=biojava.toFasta(seq);
console.writeToConsole(fasta);
The ouput of the script is:
Calling service...
Done.
Read: 1 sequences. Returning first.
>gi|111076|lcl|D31461.0|D31461 T-cell receptor delta chain BDN7, thymus - mouse
ATYFCALMERVSRRGAPDKLVFGQGTQVTVEP
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.
Subscribe to:
Posts (Atom)