2008-03-14

General service infrastructure in Bioclipse



The last week I have worked on a general service infrastructure for Bioclipse, or more specifically for Bioclipse2. the thought is to be able to easily add new services and service implementations via extension points in Bioclipse. The installed services can be displayed in the ServiceView (see figure to the right), and the aim is to add filters and hence only display the currently interesting services (based on user preference of course). Double-click the service to invoke it with a dialog or drag a resource (a sequence or a molecule) and drop it on a service to invoke it directly.


For a more detailed explanation about the extension points and examples for using it can be found on the Bioclipse wiki. Below is a sample screenshot for how this integrates into Bioclipse2.

2008-03-07

A fully working use case with recording


Much hard work has finally paid off and now there is some cool recording features in bioclipse 2. Since I know how you all would love to try it out I am now gonna explain how you can do that. The plugins needed for this example is net.bioclipse.biojava.ui and all it's dependencies. First of all we need a sequence file containing a couple of sequences. I called my file "a.fasta". Something looking like this would suffice:

>a
ACT

>b
ACG

You can create such a file in Bioclipse by right clicking in a project and creating a new file.

Now for the interesting part. This sequence file contains two sequences. If we want to translate one of them we can open the children of the sequence file by clicking on the arrow in the left of it in the bioclipse explorer. Right clicking any of the sequences brings up a context menu where biojava.ui has contributed a few actions. We can for example translate our sequence to a protein sequence. After having done that, bring up the Action History view. It is under the Scripting category in the show view dialog.

The actions history view shows a view of the recording that has been taken place while we have clicked around in the gui. Select the actions you are intrested in, right click and choose Generate JavaScript. The JsScriptGenerator will now do it's best to build a javascript out how the selected actions. That isn't always so easy but I hope it performs quite good and I know that it succeeds with the sequence translation example I have described here. Try it out and please report any problems that you might find.


2008-03-04

The 5000th commit to Bioclipse

The Bioclipse project team is delighted to announce the 5000th commit to Bioclipse made by Egon Willighagen when performing an SVN reorganization for Bioclipse2. Great job, Egon!

2008-03-01

Swedish Bioinformatics Workshop

The Bioclipse team was present during the Swedish Bioinformatics Workshop in Uppsala on February 28th-29th. Ola Spjuth held a well-received talk about Bioclipse data integration in bioinformatics, and a poster detailing the workings of Bioclipse drew both interested parties in the hallway track, and a price for best poster. Overall, the reception of Bioclipse felt very positive, and many new contacts were made, possibly leading to further collaborations.

2008-02-25

DAS workshop 2008 - day 1

Today was the first day of the DAS workshop 2008 that I visited on behalf of the Bioclipse project. It was held at EBI and had some interesting presentations and discussions. Apart from introducing the Distributed Annotation System (DAS), the first day consisted of presentations of many client implementations. DAS is basically a set of Web services for annotation of biological sequences with the goal to split data and presentation. This means that a DAS client can request info from many DAS servers and integrate the info in a single view or analysis. The technology behind is simple HTTP requests that return XML responses. Uniprot is the reference server and provides the sequences.

Jim Procter presented Jalview and VAMSAS, an exchange format to combine Topali, Jalview, and AstexViewer.

Rob Finn talked about the new Pfam website with nice feature visualization that incorporated DAS. He talked about their REST web services and how they are superior to SOAP-based implementations for resource-providers like themselves.

Rafael Jimenez demonstrated Dasty2, which is a DAS web-client using AJAX.

Thomas Down talked about Dastard and the problem of firewalls. He also interestingly brought up the question weather DAS clients should be Web-based. He himself preferred desktop apps to get better interaction with other local programs (excel etc). He also recommended the Java database Derby over HSQLDB.

Andreas Prlic talked about DAS registries and the SPICE viewer for connecting genomes with structural data and visualize SNPs and multiple alignments on 3D.

Asja Grzibovska described the DAS Writeback project that extends read-only DAS model by adding possibilities to write data back to the server.

Hagen Blankenburg described molecular interactions with DAS, called DASMI. They have extended DAS servers with support for protein-protein interactions. He also showed the DASMIweb client which is able to integrate a lot of data from interaction databases. I wonder why people keep calling it molecular interactions instead of protein-protein interaction?

Jose Ramon Macias talked about their extension of DAS to cope with 3D Electron Microscopy, called 3D-EM DAS. They had built a client, Pepper, but as they required more responsive functionality they were discussing building yet another client for DAS based on the Netbeans Rich Client Platform. He was familiar with Bioclipse but had decided to use Netbeans because he was familiar with it. Let's hope they'll honor MVC to full extent!

Syed Haider presented Biomart which basically is a convenient way of joining databases together by visualizing original tables and generating the SQL for the mart construction. They are close to having an incremental-update function. We really should build a Biomart plugin for Bioclipse!

Several people mentioned OpenID for single sign-in. This is maybe something that we should consider for Bioclipse in the long run.

Well, this ends day 1. Tomorrow we will get hands-on instructions for coding a DAS client, but first it's dinner in Cambridge.

2008-01-21

Multiple alignments in Bioclipse

I have talked a lot about about integrating Jalview into Bioclipse for visualization and editing of multiple sequence alignments. I spent some hours on the problem and it was not too hard to get things going. It's now possible to double-click an alignment in any of the formats supported by Jalview (fasta, msf, clustalw, pileup, pir, blc, pfam) and Bioclipse opens an Alignment Editor with Jalview on one tab and the source file on the second.


It is currently not possible to interact with Jalview via the mouse, this needs some wrapping of functionality into SWT actions and menus. But it's a good start :-). See the wiki page net.bioclipse.jalview for progress.

2008-01-08

Complete

Go to the Javascript Console, type rhi and press <Tab>. The command line now says rhino.

If you now type a . (after the rhino) and then <Tab> twice. The first time around, there'll be a beep, and the second time, there'll be a list of possible completions.

People seem happy about this feature when I show it to them. Myself, I'm even happier because I got to implement the (top secret) mechanism that does this under the hood. I could tell you more, but I would have to kill you.

Update: I forgot to say that this goes for Bioclipse 2 only, but I've now backported the feature to Bioclipse 1 too.

Update2: Tab completion now in the Ruby Console, too.

2008-01-02

Subversion in Bioclipse2

Since Bioclipse2 is more Eclipse-like, it is quite easy to make use of external Eclipse plugins. Here I demonstrate this by adding the Subclipse plugin for Subversion and making use of it from the Bioclipse2 workbench.

Figure: A local project shared on a Subversion repository. The editor shows compare of the local and remote version of the same document with changes highlighted.

Having version control inside the Bioclispe workbench opens up many new possibilities for collaborative work. It allows e.g. for shared editing of chemical and biological files, to resolve conflicts, and rollback any undesired changes.

The current solution requires some editing in the Subclipse source due to unresolved dependencies, but I will contact the Subclipse team and try to resolve this.

Links: Bioclipse wiki page

2007-12-21

Bioclipse 1.2.0 released

The Bioclipse Team is happy to announce the release of Bioclipse 1.2.0. This release means that the 1.x branch will no longer be supported. Version 1.2.0 contains (apart from numerous bug fixes) several exciting new features:
  • An interactive console view for writing scripts in Javascript
  • QSAR plugin with an extension point for descriptor calculations from chemical structures - mix different descriptor providers Read more...
  • Create CDK descriptors and JoeLib descriptors using a wizard (select 1-N molecules and right-click -> Calculate descriptors). Sets up Descriptor Dataset (matrix). Read more...
  • Matrix editor for editing spreadsheet-like files with custom matrix implementations (Jama is default implementation)
  • Chart view for displaying charts from e.g. Matrix editor (select cells and right-click to try) Read more...
  • Select cells in Matrix and visualize in Chart
  • Select in chart highlight cells in MatrixEditor (only scatterplot so far)
  • Spectrum feature is available again
  • SpecMol allow for visual inspection and peak assignment to atoms in spectra by clicking on molecular structure
  • Ability to easily add scripting commands via an extension point. Read more...
  • Jmol now supports switching between models of e.g. a PDB-file (animation)
  • Experimental support for BioMoby Read more...

Please note that it is not possible to upgrade to Bioclipse 1.2.0 via the online update version; it requires a new download from sourceforge.

Thanks to all developers and contributors that made this release possible!

The Bioclipse Team

Links

Towards standards for QSAR data setup

I have started to explore the possibilities of Bioclipse2 when it comes to projects with natures and autobuilds. This gave me the idea of automatic QSAR descriptor calculations, based on mine and Egon Willighagens work with QSAR in Bioclipse 1.x. The idea is to have a file (qsar.xml) that defines molecules and descriptors and might look something like below (note: demonstrational example, info and URL's are made up):


<qsar>
<molecules>
<molecule id="http://www.mol.repo.org/molecule?abc123" ns="myNS">
<molecule id="http://www.mol.repo.org/molecule?abc234" ns="myNS">
</molecules>
<descriptors>
<descriptor id="http://www.cdk.sf.net/descriptors/xlogp:implementation1" name="XlogP">
<parameter key="cutoff" value="10">
</descriptor>
<descriptor id="http://www.cdk.sf.net/descriptors/ZagrebIndex:02"/ name="Zagreb Index">
</descriptors>
</qsar>



The implementation would be an automatic build that calculates all descriptors for each molecules when the qsar.xml changes, but only for deltas (i.e. partial build, do not build already built). This means, add a new descriptor to the qsar.xml and on save it will be calculated for all molecules. This would be done on the background and produce a descriptor matrix (dataset.csv). Any plots of this matrix would also be updated.

I have started to implement this in Bioclipse2 and intend to also create a public repository for storing these QSAR setups.

So, what is missing? Having unique ID's following the REST architecture for descriptors and molecules would make it a standards candidate for QSAR data matrices setup. I shall explore this with the CDK people. Comments on the project's design and implementation are very welcome.

2007-12-14

R, matey

Try this: launch Bioclipse 2 (after the usual updating of all plugins you can think of), open up the Javascript Console, and type this:

js> R
R> x <- matrix( c(9, 9, 0, 1, 3, 2, 0, 7, 6), 3 )
R> y <- matrix( c(4, 7, 2, 1, 1, 0, 1, 6, 5), 3 )
R> x * y
[,1] [,2] [,3]
[1,] 36 1 0
[2,] 63 3 42
[3,] 0 0 30

R> q()
js>

Shiver me timbers! That's R, matey! Big kudos to kaskelot++ for making it work this far.

Support is still a bit spotty. If you happen to aggravate R in any way, it walks the plank and does not come back, and you're going to have to relaunch Bioclipse. But things can only get better from here. Expect some Bioclipse/R integration soon, for example.

Update: Thanks to some impressive C hackery from kaskelot++, R no longer crashes and goes away forever when input is less than syntactical.

2007-12-13

A first stab at echoing

Update: After a suggestion from olas++, this feature is now called "echoing", to distinguish it from actual logging. Please revise your subjective histories.

Last week, after pondering how to structure the consoles around echoing, and receiving a fair bit of help with listeners from jonalv++, I got my reward: a big fat SWTException (Invalid thread access).

Now all this is fixed, and you can experience the joys of echoing in Bioclipse 2 at home if you want:

  • Update all your checked-out Bioclipse plugins, or at least net.bioclipse.core (where the console echoer is), net.bioclipse.scripting (where we've put scripting nowadays) and net.bioclipse.ui (where you'll find the scripting console).

  • Open net.bioclipse.core.Activator in the Eclipse Java editor.

  • Find the method start and add the following code:


public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;

new Thread() {
public void run() {
for (int i=0; ; i++) {
try {
Thread.sleep(5000L);
} catch (InterruptedException e) {
}

CONSOLE.echo("Now is the time");
CONSOLE.echo("for all good men");
CONSOLE.echo("to come to the aid");
CONSOLE.echo("of their country");
}
}
}.start();

}

  • Start Bioclipse.

  • Make sure the Javascript Console is opened.


The famous phrase, used in the early 20th century when demoing typewriters, should now appear on the Javascript Console every five seconds. In the above example, we've put the echoing code into net.bioclipse.core.Activator, but generally it would of course go in Your Favorite Module in need of echoing something to the consoles.

I'd be happy to hear about bugs or oddities related to the consoles or echoing that you may find.

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 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")
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.

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.

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):

<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.

2007-10-03

Bioclipse 1.1.5 pre-release

Bioclipse 1.1.5 pre-release is a development release available only from the links below, and will be moved to Sourceforge once more testing is performed. Note that you have to point the update site (available in Preferences... -> Update Site) to http://update.bioclipse.net/dev in order to get the latest available plugins.

Among the new features are worth mentioning: CDK descriptor calculations, a GridEditor for matrices, and a new charting plugin. See the Bioclipse wiki for more information regarding the latest plugins.

Download Bioclipse 1.1.5 pre-release for macosx(carbon, x86), windows(win32, x86), linux (gtk, x86).

2007-09-04

Design of Bioclipse2 has started

Bioclipse has outgrown its original design. We have therefore decided to start the design of Bioclipse2, which will be a complete rewrite of the core API and extension points to overcome the many deficiencies of the current design/implementation. I have established a wiki page for this. If you'd like to participate in the redesign, please add your name in the members section. The discussion will be carried out in IRC (irc.freenode.net, #bioclipse) and on the mailing list bioclipse-devel.