Hints on Creating a Cytoscape Plugin

Shell Cytoscape Plugin: The source code for a shell plugin can be downloaded below. If you compile that code and install it in Cytoscape (instructions below), it will create a plugin that can be accessed from the plugin menu and that will just create a small graph in a new window. It also includes a simple options panel.

Simple, Shell Cytoscape Plugin.

The source code for the plugin can be found in the src directory after you unzip the above archive. The files in the source directory are:

To compile a Cytoscape plugin: Cytoscape plugins must be written in Java. The are regular java programs, except that they contain special classes and functions. The main trick is linking to the cytoscape_lib.jar file that comes as part of Cytoscape. That library contains all the routines that allow your plugin to access and manipulate data in Cytoscape. How you link against that file depends on your development environemnt.

The sample plugin above includes an Xcode project that can be used directly on a Mac (if you install the free developer tools from Apple). To use the project with Xcode, open the build.xml file and change the line:

   <property name="cytoscape_lib" location="/Applications/Cytoscape_v2.6.0"/>
to point to the directory containing Cytoscape.

To install a .jar plugin: Copy the plugin file (e.g. PlugIn.jar) to the Cytoscape_v2.6.x/plugins directory and restart Cytoscape.

More information: More information can be found at the Cytoscape website. Specifically:

Page created Spring 2009