This perl 5 program reads a text file of sequence features from standard input, and writes either a postscript file to standard output or a set of files which make up an Html page. The output is a graph of sequence features drawn proportionally along the sequence.
Usage: fplot [-a# -b# -c# -d#,# -fFONT -hHtml.base.name -i -l -m#,# -n# -r -s#,# -z#] <features.text >plot.ps
-a# Set the number of points each plotted feature line will take up. Default is 8.
-b# Set the height of features drawn on each feature line. Default is 4; should be 1/2 or less of 'points per line' (-a#) to keep features on adjacent lines from overlapping.
-c# Set label space, the room reserved on the plot's right side for the text labels to fit into. If you use less of the space for label, more is available for the plot. Default is 150 points.
-d#,# Draw features of only part of the DNA sequence in the text file, the part in the specified range (-dSTART_BP,END_BP). The end base pair can be indicated by number or as 'end', capitalized or not.
-fFONT Set font in which text is printed. Default is Times-Roman, a postscipt font on most printers.
-hHtml.nase.name Html output is generated. A set of three or four files are made, all file names start with Html.nase.name. The image appears in one window, and the legend in a second window. Putting the mouse over matches pops up the relevant feature info in the other frame. Works only on Netscape browsers.
-i Html output will be displayed in one browser window with the legend in one frame, and the image in the other.
-l This option prints the plot in landscape orientation.
-m#,# Set page margins (-mX_MARGIN,Y_MARGIN). Default margins are 36 points.
-n# Set the number of base pairs to be plotted per line. Default is the entire sequence on a single line.
-r Rows option. When Html output using frames is generated, the default is to split the web page into frames using a vertical divider. This option selects a horizontal divider.
-z# Set font size. Default is 9 point, which looks good with lines spaced
-s#,# Set page size in points (-sX_SIZE,Y_SIZE). Defaults are 612 pts. wide by 792 points high.
-q Print out help page.
Typically, options -n, -l, and -d are the most used. The other options are used more rarely when you want to fiddle with how the image looks. If you want the other parameters to be different all the time, I recommend changing the defaults where they are defined, in the global variables section of the program.
Example: fplot <Dna.fplot >Dna.ps
dna.fplot is a text file formatted to be read by fplot. The image is written to file dna.ps
fplot -n10000 -l -d50001,200000 <Dna.fplot >Dna.ps
The image is in landscape orientation, with 10000 bp/line scaling. The part of the DNA sequence from bp 50001 to 200000 bp is plotted.
fplot -hDNA.summary <DNA.fplot
A set of three files are written (DNA.summary,html, DNA.summary.Legend, and DNA.summary.gif), forming an Html page. If you will view the html page on another machine, transfer all four files into a single directory on the new computer. Point the browser at DNA.summary.html. The figure legend will appear in a second browser window which pops up automatically. If the dynamic legends stop working, click on the window with the image, and then again in the image window outside the image itself.
fplot -i -hDNA.summary <DNA.fplot
Html output using frames is selected. The image and legend will appear in two frames of a browser window. The browser window can be divided vertically or horizontally; a vertical divider is the default. A set of four files are written (DNA.summary,html, DNA.summary.Image, DNA.summary.Legend, and DNA.summary.gif), forming an Html page. If you will view the html page on another machine, transfer all four files into a single directory on the new computer. Point the browser at DNA.summary.html.
The text file read by fplot is semi-formatted. Key tokens are used to denote feature line sections, description lines and object types. Lines that don't begin with a token are ignored. This makes it easy to import feature information and retain identifying text from the analysis programs. Also by removing the "Line:" key token, a section can easily be removed from the plot, or two different feature lines can be merged into one. It's easy to play with these modifications and see what organization presents the data in the clearest and most informative fashion.
See the file fplot.help for more information, especially on how to format the text feature file.
Written by Jim Lund in the lab of Roger Reeves, Johns Hopkins University