lglview README



Contents
Contact
Notes
Starting a typical session
File Menu
Edit Menu
Highlight Menu
Format Menu
Find Menu
Buttons

Contact [top]

    Any and all issues concerning lglview or any of the LGL programs should be sent to Alex Adai at [alex dot adai at gmail dot com]

Notes [top]

    lglview is a 2D interactive viewer for displaying graphs produced by the layout portion of LGL. It has several features which allow zooming, coloring and labelling of features, locating features etc. Essentially all the basics one would need to explore a graph you have at your disposal with lglview. lglview is motivated by simplicity: everything should be "easy to use and understand". It was also designed with generic features for users exploring any kind of graph, including those not associated with biological data.

    lglview is not really supported anymore, but at first I tried really hard to make it functional and fast so please be kind :-)

    lglview.jar was compiled and tested on a RedHat workstation with Sun's j2sdk1.4.1. It is recommended that you also run lglview.jar with version 1.4.1 as well.

    See the examples dir for sample files.

Starting a typical session [top]

    Since lglview.jar is an executable one can run it from the command line:

java -jar lglview.jar

    Sometimes for large graphs JAVA default memory allocation is insufficient so you must manually specify the amount of memory JAVA can use. For example:

java -jar -Xmx1000m lglview.jar

sets the memory limit to 1000Mb. From Windows this would be done by going to the start menu then 'Run'. You have to check your path variables in all cases.

    Two files are necessary for a session: a '.lgl' file describing the edges; a 2D coordinate file with the vertex name followed by the 2D coordinates (whitespace delimited giving 3 columns total).You must first open the '.lgl' file from the 'File' menu, and then load the 2D coords also from the 'File' menu. You can look in the example directory for a .lgl edge file and its corresponding .coords file. You can also launch it directly from the command line:

java -jar -Xmx1000m lglview.jar edges.lgl 2d.coords

    Although the .lgl file and the coords file are all that is necessary to get going, other input can be loaded into lglview to help elucidate your graph.  To show some of the other features of the viewer the 'examples' directory has a '*.descrips' file, an edges color file '*.edge.colors', and a vertex color file '*.vertex.colors'. All of these can be loaded by looking in the 'File' menu of the viewer.

File Menu [top]

    Open .lgl file   For opening the .lgl edge file. Must be in correct format.

    Open 2D Coords  For opening the coordinates associated with the .lgl file. Must be in the following white space delimited format:

vertex1 x1 y1
vertex2 x2 y2

    Load Vertex Information    For viewing additional information associated with each vertex. After you load a file a panel will appear. That panel should have a help button associated with it. Check that out for further information. For loading 'Vertex Information' the file format is simple:

vertex1 words about vertex 1
vertex2 words about vertex 2

See the *.descrips file in the examples directory.

    Open Vertex Color File        For assigning a particular color to any or all vertices. It has to be a whitespace delimited format with RGB values for columns 2 thru 4 such as

vertex1 redFloat1 greenFloat1 blueFloat1
vertex2 redFloat2 greenFloat2 blueFloat2

    Save Vertex Colors        This allows the user to save the set of vertex colors that were assigned during the session.  This will not save the default colors of vertices. The output format is the same as the input format of Open Vertex Color File which will allow you to pick up a session where you left off.

A warning is printed to STDOUT if an undefined vertex is given. All of the floats can be values [0,1] inclusive.

    Open Edge Color File     For assigning a particular color to any or all edges. It has a similar format:

vertex1 vertex2 redFloat1 greenFloat1 blueFloat1
vertex1 vertex3 redFloat2 greenFloat2 blueFloat2

The edge is identified by two vertex ids. A warning is printed to STDOUT if an undefined edge is given. All of the floats can be values [0,1] inclusive.

    Save Edge Colors        This is identical to Save Vertex Colors mentioned above with the same caveats, except it applies to the edges.

    Reload 2D Coords File     This just reloads the coords file you opened last (exact same file name). This is used when lglayout is running and you may want to monitor the layout progress.

Edit [top]

The zoom and move step sizes represent the percent of the screen you want to change.

    Change zoom step size    Currently zoom clips the zoomStepSize of each edge and redraws the new rectangle remaining. This means that zoom can range from (0,1) non inclusive.

    Change move step size    Move step is the percent of the screen you want shifted to a given direction so its value is (0,1) non inclusive.

    Remove Transient Edges    This is an incredible optimization for the viewer. The issue with lag in the viewer is rooted with all the lines that have to be drawn and interpolated onto the panel. With this button not selected all lines are given to the panel and then the panel conveniently decides what is to be drawn, throwing away bad edges that are not actually on the panel. With this button selected, as it is by default, all lines are screened to see if at least one of the 2 vertices are even on the screen first. For zoomed regions, looking at the graph closely, or other situations where only hundreds or thousands of lines are drawn instead of millions this makes a HUGE difference in viewer performance. The end result is that edges that sit on top of the panel (neither of the vertices are in the screen area, but the edge line is interpolated onto the screen area) are REMOVED from the draw. This performance gain is not beneficial if all/most of the lines are on the screen anyway.

Highlight [top]

    Highlighting regions (holding the left mouse button down and dragging over a region) has an effect that is dependent on which of the following is selected.

    Zoom Point Select 'Zoom Point' if you want to use the mouse as a zooming utensil. Left click zooms in while Right Click zooms out. The zooming results are also a function of the values you set in edit menu (zoom step size and move step size). This is actually not a highlight region type function.

    Zoom Region Select 'Zoom Region' to mouse over a region to zoom into. This means pressing the left button, holding while shaping out a rectangular area to cover and releasing. This feature is buggy. It works best if you start in the upperleft and move to bottom right.

    ID Region Select 'ID Region' to mouse over a region you want to activate the id labels. To then turn them all back off again, select and then unselect the 'Show IDs' button.

Format [top]

    This is pretty simple...just changing basic features such as font, edge, and vertex sizes and colors.

Find [top]

    Upon selecting one of the Find menus, a separate panel is spawned.  See the Help buttons on those panels for further info. It should be OK to open multiple find panels.

Buttons [top]

    Undo    Undo the previous move or zoom.

    In    Zoom in

    Out    Zoom out

    Up    Move up through the data (picture moves down)

    Down    Move down through the data (picture moves up)

    Left    Move right through the data (picture moves right)

    Right    Move left through the data (picture moves left)

    Fit    Tries to move the whole graph into the viewing area. VERY BUGGY!!

    SnapShot   Generates a .png file of the lglview screen and offers a prompt to name it. It will only make an .png file.

    Show IDs   Show ALL ids or not. This button affects ALL vertices.

    Show Vertices   Show the vertices by drawing a small square at vertex locations.


                                                                                         All programs and content are Copyright (c) 2002 Alex Adai
                                                                                  Send any questions, comments, bugs, etc. to [ alex dot adai at gmail dot com ]