Archive for May, 2007

SWT vs Swing

Monday, May 28th, 2007

When we started on the PathVisio project more than a year ago, I had to choose which GUI toolkit we were going to use. I chose the SWT toolkit instead of the more commonly used Swing toolkit.

At the time I had a bit of experience with Swing interfaces, and I knew how ugly they can be. One of the first things you learn to do in Swing is to enable the “system look and feel”, to at least have the illusion of integration with the rest of the operating system.

Swing was touted by Sun as enabling a “cross-platform look and feel” meaning that the program would have the same look, whether you use it on Solaris, Windows or the Mac. I think this is a silly feature. Most people never run a program on different platforms. The only people who do that are either the application developers themselves, or they work at Sun, where people are blind to subtleties of modern desktops. The consequence, of course, is that you can recognize Swing apps a mile away because of the look of the GUI

SWT was supposed to fix that. SWT lets you create a GUI that is much more integrated with the rest of the operating system. Since the PathVisio project is heavily focused on usability, this sounded like a good match. But, as I found out over time, SWT is not without its problems either.

  • You always have to package a huge extra library, including native libs for each target platform.
  • SWT, Webstart, Mac OS X: Pick only two. You simply cannot have all three.
  • SWT is relatively new and hence relatively buggy. We’ve hit a number of SWT bugs during PathVisio development. Luckily, some get fixed with each new version.
  • And not least of all, the choice for SWT has prevented us from integrating PathVisio with other applications, most notably Cytoscape.

But we can get the best of both worlds by factoring out the SWT dependent code and creating a toolkit-independent layer. Luckily such a toolkit-independent layer already exists: it is called Graphics2D and is officially part of Java. There is no Graphics2D implementation as part of SWT, but if you search around you can find other open source projects that ran into the same problem and already provide a partial solution.

Integrating this idea into PathVisio will in fact be the first step of the project of Thomas Kelder, another GSOC student working for GenMAPP. I really hope it works out as planned because this is going to open a whole new set of possibilities.

Pathways and Networks

Friday, May 11th, 2007

After the last post, a few people have asked me for examples of Biological Pathways. Well, if you just head over to WikiPathways you can find hundreds of them. (There are other websites with pathways too, such as KEGG)

A Biological Pathway is usually drawn fairly simple, with only a few dozen interacting components. They’re kinda like flow-charts, not with all the visual complexity that you see in gene networks. I think this is the way it should be. “pathways” and “networks” each provide complementary views of something that happens inside a cell, one view is structured but complex, the other is more free-form but easier to understand.

Hello world!

Tuesday, May 8th, 2007

Yes, I admit. Caught red-handed. I too am contributing to the ever-expanding Blogosphere. Recent events have triggered me to actually do something that was on the someday/maybe list for the longest time. This is the result.

What recent events am I talking about? Why, I thought you’d never ask. I’m going to participate in this year’s Google Summer of Code!

My project is entitled “Visual history of biological pathways“. I’d like to explain that a bit.

I’m a PhD student, and my research involves something called Biological pathways. Biological Pathways are simply drawings of processes that take place within a Cell, for example, you could have an Insulin Signalling Pathway that schematically shows how Insulin activates the Insulin Receptor in the cell membrane, which in turn activates Ras / MAP-K proteins which in turn activate many other enzymes and glucose transporters which eventually leads to uptake of glucose from the blood.

Representing pathways as simple drawings can be a useful research tool. My contribution to all this has been the development (together with fellow PhD student Thomas Kelder) of PathVisio, a pathway creation and editing program written in Java. It’s currently in Beta.

At the same time, the research group where I work, BiGCaT Bioinformatics, was setting up a collaboration with the GenMAPP group at UCSF, San Francisco. GenMAPP was officially accepted as a Mentoring organization, and they asked me and Thomas to apply. I’m really excited about this, this is a great opportunity for me for two reasons: through the summer of code I can work closer together with the people at UCSF, plus I get to be part of a really cool open source event.

Recently at GenMAPP they started something called WikiPathways (no prizes for guessing what that is). WikiPathways is what my Summer Project is all about. Basically it boils down to this: I think WikiPathways needs a history feature, so that you can easily see what other people have changed. Although this may seem at first like a minor detail, I think it is of immense psychological value for any wiki-like system.

One thing is for sure, It’s going to be a very interesting summer!