Running GView

GView is a full Java application that can be executed directly from the jar file or from the command line. GView can be executed in two different modes: an interactive mode, or a non-interactive mode where static images are output to a file. In order to run GView, please make sure that Java has been installed.

Direct Execution

open_dialog_1_7.png

GView can be executed directly by double-clicking on the gview.jar file, found within the downloads section. This will bring up an Open dialog similar to the one shown, which can be used to select the files and a layout to render a genomic map from. This window can also be displayed if the command java -jar gview.jar is executed from the command line.

Command Line Execution

To run GView from the command line execute "java -jar gview.jar " where the arguments are as follows:

Short Flag Long Flag Argument Type Description Required
-h --help Print the usage.  
-H --height integer Specifies the height in pixels for the image.  
-c --centerBase integer Specifies the base to center on.  
-i --inputFile file name or URL The input file to parse.
-l --layout layout The layout of the input, circular or linear.  
-o --outputFile file name The image file to create. ✔ (if not using -v)
-f --imageFormat format The format of the output: [png, jpg, svg, svgz] (default:png) ✔ (with -o)
-v --viewer Loads up the input file in the viewer. ✔ (if not using -o)
-s --style file name or URL The file from which to read the style information from.  
-g --gffFile file name Specifies a .gff file with additional annotations to include. This can be specified multiple times to include multiple files.  
-b --birdsEyeView Displays a birds eye view of the map. This is ignored if -v is not used.  
-W --width integer Specifies the width in pixels for the image.  
-z --zoomAmount real number The factor to zoom in by.  
-q --quality quality The quality to render GView with. Either high or low.  
-t --threads integer The number of threads to run GView with. By default this is the maximum GView can acquire from the JVM.  
  --version Prints version information for GView.  
Examples:
  java -jar gview.jar -i example_data/NC_007622.gbk -s example_styles/basicStyle.gss -l linear -W 1200 -H 900 -f png -o image.png
  java -jar gview.jar -i example_data/NC_007622.gbk -s example_styles/gssExample.gss -l circular -v -b

Note: If you obtain an "Out of Memory" error when drawing a very large map, try increasing Java's heap size using the -Xmx option. For example:
  java -Xmx512M -jar gview.jar -i example_data/NC_007622.gbk -s example_styles/gssExample.gss -l circular -v -b

Required options

-i <file> Input File to Parse

Specify the genome data to read with this option. GView can read Genbank DNA files and display gene regions explicitly specified in the file. For backwards compatibility with CGView, GView will read CGView tab delimited or CGView XML files.

GView uses feature information from Genbank files to identify the location and names of genes in the genome. The Genbank DNA file must end with the ".gbk" file extension.

-v Use the Interactive Viewer

This option will cause GView to open an interactive viewing window. The view can be manipulated using the mouse and keyboard. See Interacting with GView for more information on this subject.

-o <file> The Image File to Create

GView can render static images and write the results to a file without opening the interactive viewer. Static images can be exported from the interactive mode using a keyboard shortcut.

-f <format> Image Format to use when Writing the Image to a File

This option is used to control the output image format of the file written with the -o option. GView currently supports png, jpg, svg, and svgz image formats. If this option is not specified, the default format will be png.

Other options

-l <layout> Circular or Linear layout

GView can render genomes in either a circular or linear layout.The default option is linear, so to specify the circular layout use "-l circular". The shorter forms c or l are also accepted.

-s <file> The file to read the style information from

Use this option to supply style information to GView. The file must contain GSS (GView StyleSheet) information. If no style information is provided, a default style with only two slots (one for genes coding in the forward direction, and one for genes in the reverse direction) will be used.

-g <file> The GFF file to read for additional annotation information

Information not available in the sequence Genbank file can be included by specifying a GFF file with additional annotations to read. The additional features can be styled separately in a GSS file.

-q <quality> The quality to render GView with.

GView can be rendered in either high or low quality. The shorter forms h and l are also acceptable. The default is high quality. High quality displays all information normally and low quality displays only minimal graphical information. Some features may render differently in low quality and require high quality view to observe them properly.

Interactive Mode Options

These options are available when using GView in interactive mode, which is specified by the -v option.

-b Displays a bird's eye view window

This option will only have an effect when GView is in the Interactive Viewer mode (-v). With this option set, an additional window with a miniaturized view of the genome will be shown. The area being shown in GView is highlighted in the bird's eye view, providing additional context.

Non-interactive Mode Options

These options are available when using GView in Non-interactive mode, which is specified by the -o option.

-c <integer> Base to Centre on

This option is used when running GView in non-interactive mode. This option will centre the view on a specific region of the genome. When used in conjunction with the zoom factor option, images of a smaller region of the genome will be produced.

-z <real> The zoom factor

This option is used when running GView in non-interactive mode. This option will set the zoom factor for the image, determining how many base pairs along the backbone that will be visible. Appropriate values for the zoom factor range from 1.0 -- 1000.0. The default zoom factor is 1.0.

-H <integer> Height for the image, in pixels

Sets the height of the image produced by GView in non-interactive mode.

-W <integer> Width of the image, in pixels

Sets the width of the image produced by GView in non-interactive mode.
 
Contact: Aaron Petkau, Eric Marinier, Matthew Stuart-Edwards at gview@phac-aspc.gc.ca