Local Alignment with JAVA (Laj) Gallery Documentation
Laj is a tool for viewing and manipulating the output from pairwise alignment programs such as blastz. It can display; interactive dotplot and pip representations of the alignments; a diagram showing the locations of exons and repeats; and annotation links to other web sites containing additional information about particular regions.
The program is written in Java in order to provide a graphical user interface that is portable across a variety of computer platforms; indeed its name stands for “Local Alignments with Java”. Currently it exists in two forms, a stand-alone application and a web-based applet, with slightly different capabilities. However, this help page will only discuss the applet version.
This applet requires Java 1.2 (or higher). For best compatibility, Sun’s Java Plug-in 1.2.2 is recommended. Please read Installing the Java Plug-in for more information.
The Laj window is divided into several sections. Across the top you will see a row of controls, and below that two indicator rows for displaying information about the positions of the mouse pointer and the “mark” (red circle) respectively.
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 the user 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 coordinates of the mouse pointer.
The large middle panel displays a dotplot view of the alignment file, 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. 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 contig name will be displayed as well (actually only the first word is displayed, to prevent long names from crowding out the other information).
Below the dotplot is a panel that provides 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 only placed in rows 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. Clicking on a bar will open a separate browser window to visit the corresponding web site.
The following panel contains a schematic diagram of the known exons, repeats, and other features in the first sequence. Again, the position indicator displays the x coordinate of the mouse pointer, and also identifies any features at that position.
The next panel displays a pip (percent identity plot) view of the alignment file. This is similar to the dotplot, except that the vertical scale represents the percentage of matching nucleotides in each gap-free segment of the 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 coloured backgrounds, or “underlays”, can be used to highlight regions of interest. The position indicator normally just displays the horizontal coordinate and vertical percentage position of the mouse pointer, but it can also display labels for the colored regions if these are included in the underlay file.
The bottom panel displays a text view of a single selected local alignment, in the style of our lat program. (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. 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 shows what fraction of the alignment fits in the window. Shaded “highlights” (analogous to the pip underlays) can also be specified; otherwise Laj will provide default highlights based on the exons file. Whenever the mouse pointer is in this bottom panel, the position indicator displays its location in the format n:x,y , where x and y are the sequence positions for the top and bottom row, respectively, while n is the character position in the text representation of the alignment. (Note that x and y do not include the gaps, but ndoes.) Labels for any highlights at that position are also displayed.
With the exception of the bottom one, 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.
You can select a particular local alignment in the dotplot or pip by clicking on it 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 entire local alignment containing the mark will change color from black to red (each local alignment typically spans several gap-free “segments”). Also, 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 row 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 bottom panel will move both the highlight and the red circle to that position. (Bug alert: sometimes you have to click twice in the bottom panel to make the red circle move.) However, gap positions cannot be selected in this manner; if you click in a gap, the left end of the gap is selected instead.
As mentioned earlier, clicking on an annotation bar will open a separate browser window to visit the corresponding web site, but clicking in the ruler or feature panel has no effect.
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, pip, features, or annotations). 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 the drag is just treated as a click. 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.
Menu Bar Controls
- Closes the Laj window.
- Changes all of the white panels to display the entire alignment file again.
- A menu, with choices “About” (version, author, etc.) and “Manual” (displays this help page in a separate browser window).