Refinements :)

30 07 2008

Gary kindly dropped by my office this morning to take a look at what I’ve got up and running so far for my plugin. It seems like the both of us are quite happy with the general functionality of the plugin, and how well our approach turned out. So what’s next is a few new features that I will be adding to my plugin:

  • Of the total number of iterations of the algorithm, users can specify what percentage of these iterations they would like the network nodes to be moved as well. [Kindly suggested by Greg :)]
  • Reposition the labels (and network nodes as well, taking the previous feature into account) only for the selected nodes.
  • Implement some sort of smart label wrapping which will wrap long labels into more of a square/circular shape.

In addition, I will also be spending some time testing out my label plugin to see which default values will work best for the plugin.

With a week and a half left of my GSoC summer (I will be volunteering at the Agile Conference next week), I am going to implement as many of these as I can. :)

Advertisements




New Approach

28 07 2008

As of last week, I’ve completed my first label repositioning plugin. It successfully repositions the labels of the network so that the networks are more readable. However, it is currently tied with the Force-Directed layout algorithm in Cytoscape. Also, this current approach creates too many additional temporary edges, which are later removed. So after meeting with my mentors last Friday, we’ve decided to take a new approach:

  • Make a copy of the current Force-Directed layout class (this will also copy the Tunables over so that constants that the algorithm needs can still be set by the users)
  • Convert each label to a LayoutNode as well
  • The list of LayoutNodes that will now be used will contain both network nodes and labels
  • Modify the algorithm so that it only needs to look at the x and y coordinates of various LayoutNodes

So this is what I will be working on for the next little while. :)

Here is an example of how networks look after the current label plugin is applied:

Before:

After:





Cytoscape Retreat 2008 & Automatic Label Plugin Progress

17 07 2008

This year’s Cytoscape Retreat is being held on campus (University of Toronto – Terrence Donnelly Centre for Cellular and Biomolecular Research Buildling). It’s been a good chance to meet others that are also working on Cytoscape. And it is also a good place to practice giving demos.. :)

For the past week or so, I’ve been reading more source code! But this time they were graph drawing classes that others have already implemented in Cytoscape. My mentors have suggested that I check if I can use an existing graph drawing algorithm if they’re suitable, instead of writing my own if it already exists. So I’ve been reading the Spring-Embedded JGraph layout code that Cytoscape currently offers through JGraph. I was planning to copy the source code over and make slight modifications to them in order to implement my own plugin. However, the current Spring-Embedded algorithm relies heavily on other JGraph classes within their layout packages. This has become a problem in the development of my plugin, because my plugin will be a Cytsocape plugin and it will not be offered under JGraph. So in order to make this all work, I can either:

  1. Take whatever classes that the Spring-Embedded algorithm relies on, and include them in my label plugin’s jar file.
  2. Write my label plugin based on the Cytoscape plugin template, and copy pieces of the implementation in the Spring-Embedded layout algorithm over to my label plugin, wherever they are relevant.

The first approach does not work out very well. Like as I mentioned above, the Spring-Embedded layout has been implemented in such a way that it relies heavily on its fellow JGraph classes. Hence, if I were to copy over the necessary classes needed in order to make the Spring-Embedded layout run as a simple Cytoscape plugin, I will have to copy over a lot of classes due to the complex dependencies involved. So I’m most likely going to give the second approach a shot, unless I can find a third approach that will be even better. Taking the second approach should not be too difficult since the Spring-Embedded algorithm is quite simple.

I will continue to speak to other Cytoscape developers at the retreat, and see what others think about this problem. I’m sure I will get some interesting feedback on this issue, and maybe even some interesting solutions!





Algorithms!

10 07 2008

Upon the completion of my second subtask, I’ve started learning more about graph drawing algorithms. Specifically, I’ve been focusing on force-directed algorithms since it seems to be the simplest approach to solving the label layout problem Cytoscape is currently experiencing. I’ve been working with the following sources:

Some of the above sources are algorithms and examples. Others are articles that I’ve found in order to understand certain concepts and examples.

At the moment, I’m beginning to put the pieces of what I’ve learned in the past few weeks about graph drawing together. More research may be needed, but I will be able to start implementing my automatic layout plugin soon!