Using Processing to create Cytoscape plugins   4 comments

Cytoscape is a cross-platform, open source application for visualization and analysis of networks. It is widely used in the field of Systems Biology to visualize different types of biological networks (like protein-protein interactions). It also has a plugin mechanism for extending its core functionality. Cytoscape is written in Java, so this open the possibility of using Processing to create Cytoscape plugins. I just put together a small template for creating Processing plugins for Cytoscape using Eclipse, keep reading for more details.

Besides using Processing’s API to write Cytoscape plugins, it is also posible to load Processing libraries from within the plugin. This allows for OpenGL-accelerated graphics, video and audio capabilities, rendering of complex geometries, connection to other hardware devices (Arduino, sensors), etc. The first version of the template (based on Sojamo‘s template for Processing libraries) is available here. This initial template has one issue, which is that closing the plugin window will close the entire application.

How to use? First unzip the file and import the project from Eclipse. Add the cytoscape.jar and core.jar files to the /lib folder, and then open the build.xml ant file located in /resources. This file compiles the plugin and puts the resulting jar in the /distribution folder. To install the plugin in Cytoscape, copy this jar to the plugins folder of Cytoscape.

The template also includes a class for simplifying the debugging of the plugin, PluginDebug. Running the project as a Java application from the Eclipse IDE will show all the Main classes available in the project (most of them come from cytoscape.jar). Choose “PluginDebug – processing.plugin”, which should launch an instance of cytoscape and install the plugin in its menu.

The online reference of the cytoscape API should come handy when coding plugins, and the developer wiki contains useful bits of code. The discussion forum is also a good source of information.



Posted March 17, 2011 by ac in Programming, Science, Visualization

Tagged with , , , ,

4 responses to “Using Processing to create Cytoscape plugins

Subscribe to comments with RSS.

  1. Which version of cytoscape are you using? I cannot seem to find core.jar anywhere in the cytoscape 2.6.1 zip file

    • Hi! You need to copy core.jar file from Processing.

      I’m using Cytoscape 2.8.0, didn’t try with 2.6.1. Let me know if you have any other question.

      • Processing? where is that? I’ve just installed Cytoscape_2_8_0_windows_64bit.exe, where can I find the core.jar file?

      • Processing is a Java-based language to create interactive graphics, animations, etc. This is the homepage.

        Processing has a simple API to program 2D and 3D graphics, so I thought it could be convenient in certain cases to use Processing to write Cytoscape plugins.

        Now, in order to use Processing in your Cytoscape plugin project, you need the core.jar file from Processing. You find this file in the Processing zip package which you can download from here. After downloading, unzip and go to the lib folder, and there you should see core.jar. Then copy it to the lib folder inside the Eclipse project.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: