Laj as a Stand-Alone Application


TABLE OF CONTENTS


Introduction

This document provides instructions for people who want to install Laj as a stand-alone application on their own computer, in order to view their own choice of data files. Both forms of Laj (applet and stand-alone application) are distributed together, so the initial download and unpacking instructions are the same. The stand-alone mode does not require a web server or browser, but you do need to have Java virtual machine software to run it. This mode cannot visit linked web sites like the applet does, but it has additional capabilities for comparing and manipulating alignments from up to two separate alignment files.

Installation

Laj is available for download as a compressed zip archive,  laj.zip . This was created with the Java jar tool, but the format is compatible with PKUnzip and many other unzip programs. Unzipping the archive will produce laj.jar (a jar file containing the program itself) and a docs subdirectory containing some documentation files in HTML format. If your unzipper program does not preserve the directory structure and complete file names from the archive, you may want to move and/or rename the files manually. Note that the laj.jar file does not need a second round of unzipping -- Java will access it "as is".

Since Java programs are not directly executable by themselves, you will also need Java virtual machine software that supports at least Java 1.2, and preferably Java 1.3 or higher. You don't really need a full-fledged Java development kit for this; a simple runtime environment such as Sun's free JRE should be fine. (Much of the information in Installing the Java Plug-in also applies to obtaining the JRE/JDK.) Follow the installation instructions included with the product you choose.

Starting Laj

The Java runtime environment does not have its own GUI, so you generally need to run Laj from a command line (e.g., in the MS-DOS Prompt window on Windows 98). The command to type in looks like this:

    [path1]java -jar [path2]laj.jar
where [path1] is the location of your java program file (perhaps c:\windows\system\ on Win98, or /usr/bin/java/ on a Unix system), and [path2] is the location of the laj.jar file that you installed. Note that you can leave off [path1] if you have set up your system command path to include the location of the java program. Depending on how your system is set up, it may also be possible to run the jar file directly by just typing its name or double-clicking on it.

If your data file is large, you may need to give Java more memory using the -Xmx switch. For example, the command

    [path1]java -Xmx1000000000 -jar [path2]laj.jar
would run Laj with a memory allowance of ~1GB. At least it would with Sun's Java; this option may not be supported by all vendors. (Tip: if these commands get burdensome to type, you can build a batch file or shell script to handle the parts that don't change from run to run.)

The window that appears will look rather empty, because you haven't loaded any data yet. To do so, click your mouse on the File menu and choose Open. A dialog box will prompt you for the names of various input files. For detailed descriptions of these files and their format requirements, please see Input File Formats for Laj. Only the first file is required; the rest are optional (though if you don't override the sequence files, Laj will expect to find them in the locations specified within the alignment file). For files located in the current directory you can just type their names, otherwise you'll need to supply complete path names. Any file name ending with ".gz" will be assumed to be in GZIP format. When you click the OK button, the empty window will be replaced by a new one displaying the loaded data.

As an alternative to using the dialog box, it is possible to specify all of these files on the command line. For more information, run Laj with the -help command line switch.

    [path1]java -jar [path2]laj.jar -help

Screen Layout

The Laj window is divided into several sections. Across the top you will see a menu/control bar, and below that two indicator lines for displaying information about the positions of the mouse pointer and the "mark" (red circle) respectively. The controls will be discussed individually in the Menus and Buttons section of this document.

Ruler:
The first graphical panel is a horizontal ruler that displays tick marks corresponding to positions in the first aligned sequence. These are intended to give you an immediate general feel for the location and scale of the region being displayed. Precise locations can be determined via the position indicator, which displays the exact coordinate of the mouse pointer.

Dotplot:
The large middle panel displays a dotplot view of the alignments, with the first sequence (often human) along the horizontal x-axis and the second sequence (e.g., mouse) along the vertical y-axis. If the second sequence contains multiple contigs, they will appear as separate horizontal bands across the plot, each with its own y-axis coordinate system. The first alignment file you specified is called the primary file, and is displayed with thin black lines. If you specified a secondary file, it is displayed with thicker blue lines. Wherever the two displays overlap, the secondary file is "on top" and obscures the primary one. Whenever the mouse pointer is in this panel, the position indicator displays its location in the format "x,y", where x is the position in the horizontal sequence and y is the position in the vertical sequence. If there are multiple contigs, then the first word of the contig name will be displayed as well.

Annotation links:
Below the dotplot is a panel that can display links to additional information about various sequence regions. Each annotation is represented by a color-coded bar spanning the region's position in the first sequence. The bars' vertical positions are not meaningful; they are placed in rows only for convenience, to keep them from overlapping. Pointing to a particular bar will cause the position indicator to display the x coordinate of the pointer, and also the type and description of that bar's annotation; otherwise only the x coordinate will be shown. However, in stand-alone mode Laj does not actually follow the link when you click on a bar, because unlike the applet it is not running inside a web browser. If you do not provide an annotation file, this panel will not appear.

Sequence features:
The next panel contains a schematic diagram of the known exons, repeats, and other features in the first sequence, if these files were provided. Again, the position indicator displays the x coordinate of the mouse pointer, and also identifies any features at that position.

Pip:
The next panel displays a pip (percent identity plot) view of the alignments. This is similar to the dotplot, except that the vertical scale represents the percentage of matching nucleotides in each gap-free segment of a local alignment, instead of its position in the second sequence. Only the top half of the plot is shown, since segments matching less than 50% are not very interesting. An additional feature of this panel is that colored backgrounds, or "underlays", can be used to highlight regions of interest if you provide a file with this information. The position indicator displays the horizontal coordinate and vertical percentage position of the mouse pointer, and it can also display labels for the colored regions if these are included in the underlay file.

Text view:
The bottom panel displays a nucleotide-level view of a single selected local alignment. (Initially it is blank, since you haven't selected anything yet.) The top row of this display shows the nucleotide sequence from the first species (x-axis in the dotplot), while the bottom row shows the sequence from the second one (y-axis). Both sequences will likely have had gaps inserted by the alignment program. The middle row contains symbols to indicate how well the nucleotides match at each position; this matching is case-insensitive to deal with soft masking, but non-nucleotide characters such as X or N never match anything, even themselves. Note that most of the local alignments will be much too long to fit across this window, so a scrollbar is provided; the relative size of the scrollbar's slider indicates what fraction of the alignment is shown in the window. Shaded "highlights" similar to the pip underlays can also be specified; otherwise Laj will provide default highlights based on the exons file (if given). Whenever the mouse pointer is in this bottom panel, the position indicator displays its location in the format "n:x,y", where n is the column position in the text representation of the alignment (starting with 0), while x and y are the sequence positions in the top and bottom rows, respectively (starting with 1). Note that x and y do not include the gaps, but n does. Labels for any highlights at that position are also displayed.

With the exception of the text view, all of these panels use the same horizontal coordinate scale (i.e., position in the first sequence), and they are always kept vertically aligned so they can be compared easily.

Mouse Controls

You can select a particular local alignment in the dotplot or pip by clicking on one of its segments with the left mouse button. (Actually you don't have to click exactly on it, because Laj will automatically jump to the nearest point in the same contig if you miss.) The spot will be marked with a small red circle in both the dotplot and the pip, and the corresponding text view for that alignment will appear in the bottom panel with the selected position highlighted. This requires loading the sequence files, so it may take a few moments. Lastly, the mark indicator line will be filled in with information about the marked alignment and position, including the contig name if the second sequence is fragmented. Note that there is only one mark at a time, so the previous one, if any, will be unmarked.

In a similar fashion, clicking the left mouse button in the text view will move the mark (both the highlight and the red circle) to that position (though sometimes you have to click twice). However, gap positions cannot be selected in this manner because they do not correspond to pip segments; if you click in a gap, the left end of the gap is selected instead.

You can "zoom in" on a particular region by dragging out a rectangle with the left mouse button in any of the white panels (ruler, dotplot, annotations, features, or pip). All of these panels will always zoom together, to keep them lined up. This can be repeated until the maximum resolution is reached; after that Laj will display an error message. Note that selecting your zoom in a non-dotplot panel only zooms horizontally (the zoom rectangle is always full-height), so to keep the dotplot looking nice it is best to select your zoom there, and keep the zoom rectangle roughly proportional to the dimensions of the existing dotplot panel.

Holding down the right mouse button over any of the white panels adds crosshairs at the mouse pointer's location, which is convenient for determining whether two regions really line up. If you have a one-button mouse, you can achieve the same effect by applying the Shift key when initially pressing the mouse button.

Menus and Buttons

File - Open:
Loads a new set of data files into Laj, replacing the currently displayed data, if any. A dialog box is presented for you to enter the new file names. (See discussion under Starting Laj, above.)

File - Save:
Allows you to save the alignments that are currently visible in the dotplot and pip to another file, using a format similar to the input. For example, you could select and flag several alignments of interest and uncheck both the Primary and Secondary boxes so only the flagged alignments were visible, then save them to a new file. Conversely, you could select and flag some undesirable alignments, uncheck the Flagged box to make them disappear, and also filter the remaining alignments (or not). (See below for explanations of these additional controls.)

Note that "visible" means the alignments that are currently available for display according to the checkbox controls, i.e., zoom is ignored. An alignment that would be displayed, except that you have zoomed in on another area, will still be saved. Thus it is a good idea to use the Unzoom tool to double-check your selections before saving.

File - Quit:
Exits from Laj and Java.

Tools - Flag:
Flags the currently selected local alignment (the one containing the red circle) by changing its color to red. This is a good way to see the complete extent of a particular alignment in the dotplot and pip, since each local alignment typically spans several gap-free "segments". You can have several alignments flagged at the same time, from either or both of the input files.

Tools - Unflag:
Changes the local alignment containing the red circle back to its original color.

Tools - Unzoom:
Restores all of the white panels back to the original, unzoomed view.

Primary, Secondary, Flagged:
These checkboxes control which alignments are displayed. When one is unchecked, that entire category becomes invisible. This is handy for viewing one alignment file at a time, especially if they overlap. Note that the flagged alignments comprise a separate category for this purpose, i.e., they no longer "belong" to the primary or secondary file until they are unflagged again.

Filter:
This checkbox is orthogonal to the others. Some alignment programs mark particular alignments with a filter tag to indicate that they are less significant in some way. For example, if a region in the human sequence aligns with several regions in the other species, dblast will favor the longest one and tag the others as filterable. Checking this box makes all such alignments disappear from the dotplot and pip, which is useful if the alignment file contains a lot of "noise".

Help - About:
Displays a message window with information about Laj, including version, author, etc.

Help - Keys:
Displays a message window listing Laj's keyboard shortcuts. No Alt key is needed, since Laj doesn't use the keyboard for much else.

Footnotes

[1]  The circular mark and the flagged local alignments are red when the background is white, but are displayed in different colors against other backgrounds to ensure good contrast.



Cathy Riemer, December 2005