Using Medusa

At a glance look...Instructions are explained further in detail...

1, File menu commands

Load

Simply load a graph using the 'load' menu item. The format for the graph file is described below:

Example file starts here---------

Comments can be added to the file here. The edges part is a list of from-node, to-node, interaction type and confidence. Confidence can range from 0.0 to 1.0, with 1.0 being an opaque line. The nodes list is the node label, x position, y position and color. The color post may vary when the file is saved, but the important thing is the format (c r,g,b) which defines the RGB components (0-255). Note that the x and y coordinates are required as yet.

*edges

n1    n2    i 1    c 0.5

n2    n1    i 3    c 0.5

n1    n2    i 2    c 0.5

n1    n3    i 1    c 1.0

n3    n2    i 1    c 1.0

n4    n2    i 1    c 1.0

n4    n1    i 2    c 1.0

n3    n5    i 2    c 1.0

n3    n5    i 3    c 1.0

*nodes

n1    0.9293069    0.0362013   c 255,255,0   s 0

n2    0.3748358    0.3205722   c 128,128,0   s 1

n3    0.7220667    0.3226942   c 0,128,190   s 2

n4    0.3437040    0.9872734   c 64,32,24   s 1

n5    0.3683788    0.6349639   c 99,30,230   s 0

-----------Example file ends here

Orientation

To specify more than three multiple arcing edges, add an orientation column to the edge definition in the data file. As of now, up to three parallel edges are added automatically by the program if no orientation exists. The way orientation works is as following: Negative values specify a bezier curve to the 'left' from node A to node B. Positive arcs curve 'right'. A zero value is a straight line. Example:

n1    n2    1    c 0.5    o -1.5

n1    n2    1    c 0.5    o -0.5

n1    n2    1    c 0.5    o  0.5

n1    n2    1    c 0.5    o 1.5

creates four parallel edges from node n1 to node n2. All edges in this example have interaction type 1 and confidence 0.5.

Further parameters

There are further options available in the data file. The basic format is o -1, where o means orientation and -1 is the value. A full list of options follows:

Edge options Option Explanation

o orientation (double)

i interaction type (integer 1 - n)

c confidence (double 0.0 - 1.0)

Node options

c color in r,g,b (integers 0 - 255)

f node fixed or not. set true or false

s shape (currently 0-3)

a "annotation", e.g "mitochondrial"

Save

Select 'save' from the menu to save as a medusa data file.

Export

Exports the network panel to a jpg or png image. If the panel size is larger than the screen, the image will also be larger. Furthermore, the graph can be exported to postscript (PS or EPS).

2, Layout commands

Relax

A spring layout that is not very dynamic or effective, but which is interactive. Nodes can be pulled or fixed (see below) to enhance the visualisation. Cooling This option, when toggled on, causes the linear spring to cool down over time. This removes any potential "jittering" in large networks due to integer rounding issues. Clicking a node in this mode will raise the temperature back up to the initial value before decreasing again.

Interactions

Toggle the interaction colors and bezier curves defined by the type of interaction given in the data file. Labels Toggle node labels. When turned off, a tool tip will appear when the mouse hovers over a node. Directed Toggles the arrows. NetView considers all edges to be either directed or undirected. Removing arrow heads will cause the graphical display to show undirected edges.

Spring

Uses the Fruchterman Rheingold algorithm for an automatic layout.

Changing scale

The slider in the right panel controls the canvas size. Inital value is a 600 x 600 rectangle, which can be scaled up to 300% by using the scale slider.

Recalculate edges

This will force recalculation of edge orientation over the whole data set. This is useful when adding edges while relying on the automatic assignment of orientation.

3, Moving and fixing nodes

Moving nodes

Simply drag a node to the desired location.

Fixing nodes

Ctrl+click on a node to fix it. It will show that it is fixed by having a yellow outline. This node will not move in any Spring layout.

Fixing a group of nodes

Drag a box around the nodes while holding down the left mouse button. Also, two other options are a, using regular expressions to fix nodes (see Regular Expressions in Java if you are unfamiliar with regular expressions), or b, fixing nodes with a file of node names.

Moving groups of nodes

As of yet, the only way is to fix the nodes you wish to move, then shift+drag one of the nodes to the desired location. All fixed nodes will follow when the mouse is released.

4, Manipulating graphs

Deleting nodes

Deleting nodes can be done in two ways. To delete an individual node, right click and choose 'delete' from the menu. To delete the fixed nodes (see above), choose 'delete nodes' from the manipulate menu. Note that nodes are automatically along with their last edge. If a deletion of a node means that another node loses its last link, then both nodes are deleted. This follows the basic concept that an unconnected node is pointless and will be removed.

Adding edges

Edges can be added by holding the right mouse button and dragging the mouse between two points. If the points contain existing nodes, an edge will be created between them. If points contain no nodes, new nodes will be created.

Appending graphs

Graphs in separate data files can be combined using the append option in the file menu. Layout will not be conserved.

Cropping graphs

Edges can be removed using the confidence scores as a cutoff. Choose the crop -> conf option from the manipulate menu. Similarily, edges can be removed by interaction type: crop -> type.

5, Interactions

Legends

The edge colours and descriptions can be specified in an interaction file. This file would simply look like this tab-delimited file:

1    This is my interaction    255,255,120

2    Some other interaction    120,0,0

etc

Simply load this file to change interactions Hide/Show edges Toggling the buttons associated with interactions will show or hide the edge type. This is useful when handling graphs cluttered with a high proportion of edges.

The interaction panel can be hidden and shown with the Hide/Show menu item