A list of current GOBU plugins (extension software) is given in this page. Plugin related programming topics will be provided in this page.
Contents
- Preface
- Plugin List
- Customized Plugins
- Plugin Programming
- Plugins Activated by Menu Selection
- Plugins Activated by Tree Node Selection
- Config Tree
- GOBU Tree API
- Property String Handlers
- Existing Property String Handlers
- PowerPoint Files
The section Plugin List gives an entry point of plugin information. Sections Plugin Programming and Property String Handlers are of programming related topics, and we don't suggest your reading if you are not interested in programming stuff.
To programmers: We suppose you had read Technical Section.
Here we list available plugins of GOBU. General purpose plugins are listed in Operation Manual.
- Genome View Plugin
- Conserved Segment View Plugin
- Listing
- Draw Focus Tree Plugin
- Data Distribution Chart
- GO Distribution Chart
- MultiView Plugin
- FastInput Plugin
- ExpressionView Plugin
Plugins customized for individual pipelines are listed here:
- Ferret Plugin
Plugin-writing related classes are collected in bio301.goutil.gobu.plugin package. Existing plugin classes are collected in bio301.goutil.gobu.plugins package. To write your own plugin, you need to implement a GOBU interface, GobuPlugin01. After compiling your plugin class and put it into a .jar file, you just need to put the .jar file into the plugins sub-folder of your GOBU folder for enabling your plugin. Enabled plugins will be listed in the Configuration Plugin. There are two ways to launch a plugin: by (popup) menu selection, or by tree node selection. Related concepts are described in the following two sub-sections.
Every GobuPlugin01 instance has a field named gobuFrame. gobuFrame holds the reference to the GOBU main window object (of class bio301.goutil.gobu.GobuFrame). By accessing gobuFrame, we are able to access GO tree, user tree and focused GO tree, where they are respectively named by jTreeLeft, jTreeMid and jTreeRight.
NOTE: We strongly recommend programmers to read at least Java Documents of GobuPlugin01. We also recommend programmers to trace the source code of bio301.goutil.gobu.plugins.testplugin.TestPlugin.
A plugin can be listed and selected by four menus:
- GOBU menu bar: by selecting Plugins menu
- GO tree popup menu: by clicking a GO node and mouse-right-click
- User tree popup menu: by clicking a user node and mouse-right-click
- Focused GO tree popup menu: by clicking a node and mouse-right-click
If you want your plugin to be launchable by a menu selection, you have to assign a String value to XxxName and extend corresponding XxxLaunch() function. For example, in bio301.goutil.gobu.plugins.testplugin.TestPlugin, the field menuName is assigned by "test plugin menu" and corresponding menuLaunch() is implemented so that the String "launched by menu" will append to the plugin window.
The mechanism of activating plugins by tree node selection is to let plugins immediately response user selection on a tree node. The general concepts are:
- A GobuPlugin01 instance should register its PropertyListeners to the PropertyListenerManager object held by GOBU main window. Every registered PropertyListener will take care only for programmer-designated selections.
- User may click on some tree nodes.
- Corresponding PropertyEvents will be generated by GOBU.
- GOBU will dispatch these PropertyEvents to registered PropertyListeners.
The interface PropertyListener assigns only one method named propertyChanged. This method has exactly one parameter -- a PropertyEvent instance. By accessing this instance, we are able to know the meaning of the selection (methods getNode and getSelectionLevel). We strongly recommend programmers to trace bio301.goutil.gobu.plugins.testplugin.TestPlugin for better understanding.
Config tree is a simple tree-structure information repository of GOBU. Tree format files in config sub-folder (of GOBU folder) will be loaded at start-up, then plugins can access config tree by accessing gobuFrame.configTree.
In config tree, loaded plugin classes are listed in the sub-tree rooted at "Configuration\tSystem Information\tPlugins".
In bio301.goutil.gobu.GobuTreeUtility, several useful tree functions are provided. For detailed usage, please refer corresponding Java Documents.
- getPathString: Given a tree node, return its corresponding path string (starting from tree root).
- getNodeFromPathString: Given a path string, return a tree node assigned by this path string.
- searchAncestorForSameType: Given an tree node, return the nearest ancestor of the specified type.
- searchSubUserTreeForSameType: Given a tree node, search the corresponding sub-tree and return a Set of tree nodes of specified type.
- searchSubUserTreeForSameTypeWithType: Given a tree node and two types, search the corresponding sub-tree and return a Map. This Map will contain first type tree nodes as keys and Sets of second type tree nodes as values.
Examples:
- In Quick Jump Plugin, we use getPathString to get the selected path string of focused GO tree, then use getNodeFromPathString to obtain the corresponding tree node object in GO tree. Finally, we use some Java API to make the desired node in GO tree be selected and visible.
- In Genome View Plugin, we use searchSubUserTreeForSameTypeWithType to obtain the R-Node_to_Loc-Properties relationships. Besides drawing these locations on chromosomes, we also attach corresponding R-nodes to these locations -- this is why we are able to label these locations with their names.
- In Conserved Segment View Plugin, we use searchAncestorForSameType to search a unit node, then use searchSubUserTreeForSameType to search corresponding R-nodes of the same group -- this is why we are able to draw orthologous relationships as links.
Property String Handler mechanism is designed for memory saving. For example, node names of LOC P-nodes (P-nodes representing user-defined LOC data type) are stored as Strings in memory. Observe that these node names are strings like "LOC:(11562763,12119228)@chr13@Mouse", we found that the starting point number and the ending point number can be saved as two int. We also noticed that sub-strings like "chr13" and "Mouse" are highly repetitive in all these node names, and we can just replace them by some Object references. By so doing, some memories are saved from recording P-node names.
Property String Handler related classes are collected in bio301.goutil.gobu.property package. Existing handler classes are collected in bio301.goutil.gobu.properties package. To write your own property string handler, you need to implement interface PropertyStringHandler. After compiling your handler class and put it into a .jar file, you just need to put the .jar file into the properties sub-folder of your GOBU folder for enabling your handler. Enabled handlers will be listed in the sub-tree rooted at "Configuration\tSystem Information\tProperty String Handlers" in Configuration Plugin.
<ItalicString> means a variable.
- LocProperty
- Handled type: LOC
- Description: LOC data type describes genomic locations (ranges) on a chromosome of a genome.
- Type content: (<starting poing>,<ending point>)@<chromosome name>@<genome name>
- ConfidenceProperty
- Handled type: confidence
- Description: confidence data type describes confidence levels.
- Type content: <confidence value (floating point number)>
Here are some PowerPoint files for GOBU plugin programming, check out them if you are interested:
- GO Browsing UtilityPlugin design - part 1
- GO Browsing UtilityPlugin design - part 2
- GO Browsing UtilityPlugin design - part 3