The Graph Viewer Plugin

The Graph Viewer Plugin uses the open source GraphViz package to draw parts of an OBO-Edit ontology as a graph (as opposed to the standard tree view).

GraphViz is an independent, external application available from http://www.graphviz.org/ (the MacOS version is at http://www.pixelglow.com/graphviz/). GraphViz does not come with OBO-Edit. It must be installed separately for the Graph Viewer plugin to wsork.

This plugin requires a fair amount of configuration to get it to work. See the Plugin Configuration section below to learn how to get started.

Using the Plugin

Start the Graph Viewer Plugin by selecting it from the "Plugins" menu. When correctly configured, the Graph Viewer Plugin looks like this:

The picture in the center is generated by GraphViz, based on the current selection in the ontology editor panel. Terms are represented by term names enclosed in a filled shape (the particular shape is user-configurable). The arrows represent relationships between terms. Clicking a term name on the graph image will cause that term to become the main OBO-Edit selection.

There is a row of controls underneath the graph image. The "Options" button opens the configuration windows (see Configuring the Plugin below). The "Save" button allows the current graph image to be saved as a JPEG or GIF file.

The dropdown box in the center determines the relationship between the current selection and the graph that is drawn. The options are:

Configuring the Plugin

Getting Started

Step 1 - Install GraphViz

GraphViz is available for Windows, Mac OS and Linux from http://www.graphviz.org. GraphViz is also packaged with some Linux distributions, such as Suse Linux. Linux users should try to use the version of GraphViz that comes with their distribution if possible to avoid compatibility problems.

The heart of GraphViz is a tiny program called "dot". This is the program that OBO-Edit uses to create GraphViz displays.

Step 2 - Set the path to "dot"

To set the path, click the "Options" button on the Graph Viewer Plugin. When the configuration window appears, click the "Paths" tab at the top of the screen.

Type the path to the "dot" utility into the box labeled "Application path", or use the "Browse..." button to locate the file on disk. The default locations for the dot utility on various platforms are:

Note that on MacOS, you do not need to specify the location of the "dot" utility, just the location of the GraphViz application. The "dot" utility is hidden inside the Graphviz application, and OBO-Edit knows how to dig it out.

The Graph Viewer Plugin should now be working!

Detailed Configuration

To configure the Graph Viewer Plugin, click the "Options" button:

Once the configuration options have been set, press the "Save Options" button to accept the changes.

Each tab at the top of the screen provides access to a different screen of configuration information:

Fonts

The first tab shows font configuration options. A font configuration control consists of three dropdown boxes. The first lists the available font family names. The second specifies the font size in points. The font size can be chosen from the dropdown list, or a value can be typed directly into the text box. The third dropdown allows the font style (normal, bold, italic or bold-italic) to be selected.

There may be fonts installed on your system that do not appear on this screen. OBO-Edit only displays scalable fonts that are accessible by Java, because these are the fonts most likely to be usable by GraphViz.

The first font selection control specifies the font that will be used to display the relationship type name labels on links.

The second font selection control specifies the font that will be used to display term names.

Colors

The colors tab controls the colors in the graph image:

The list on the left contains the names of all the configurable colors. The first 10 color options are the same in every ontology; these are called named colors. The rest of the options specify special coloring for links with different relationship types. These are called link colors, and the available link colors vary depending on which relationship types exist in an ontology.

To specify a named color, left-click the color name in the list, and choose a color using the color chooser to the right. The available named colors are:

There is a link color item for every relationship type in the ontology. When a relationship type is selected, a two-part color selector appears on the right:

The first tab selects the link label color. The second tab selects the link arrow color.

Shapes

The shapes tab controls the shapes in which terms, relationship types and obsolete items are enclosed:

There are three dropdowns that control the outline shape for terms, obsoletes, and relationship types. The available shapes are:

Paths

The Paths tab specifies the GraphViz application path and other options:

The application path specifies the location of the GraphViz "dot" utility (see "getting started" for more information).

When the Graph Viewer Plugin displays a graph, a temporary image file is generated on the disk. The "Default display format" dropdown specifies the image format for this temporary file. The options are "jpg" and "gif". If "jpg" is selected, the images will be generated slightly faster and take up slightly less room on the disk. If "gif" is selected, the images will be clearer looking.

Normally, GraphViz draws graphs with the roots on the bottom of the image. Click the "Draw graph with root on top" checkbox to make OBO-Edit trick GraphViz into putting the root nodes on top.