[ Genetics Computer | GCG | Windows 95 | Online Guides | CMMG Home ]
Many programs in GCG have graphic output, such as restriction maps or RNA secondary structure predictions. You have several choices as to how to handle the graphic output:
1) Display it on your screen.
2) Print it directly to the printer attached to your PC or Mac terminal.
3) Save the output to a file and then print it later.
For printing PostScript or HPGL files through the network directly to the printer attached to your PC, you will need to use a terminal program capable of printing in "transparent mode", so that the files are sent directly to the printer without processing by your PC. The shareware QVT/Net Terminal program is a good choice for these purposes. Note that you can use these methods for printing any files, not just files created by GCG.
If you do not have a PostScript-capable printer available, you can use the freeware programs GhostScript and GhostView for viewing and printing PostScript files on your PC.
These instructions assume you are using the Genetics UNIX Biocomputing Workstation.
Before you run a program with graphics output, use the GCG setplot program to tell GCG how you want to display, print, or save your graphics output. In HYGCGmenu, go into and execute setplot from the Display / Graphics menu. From the genetics% prompt, type setplot and press enter. This program presents you with a menu of choices:
|colorX Color X Windows Graphics Window | |monoX Monochrome X Windows Graphics Window | |psfile PostScript output saved as file graphics-time.ps | |hpfile HPGL output saved as file plot-time.hp | |lw PostScript output on your LaserWriter | |laser HPGL output on your LaserJet | |tek Tektronix output on your telnet screen | |pngfile PNG output saved as file program-time.png | Make your selection with the up or down arrow keys and press return.These are fairly self-explanatory, but here is some additional information about the various menu choices that may help you.
XWINDOWS
The colorX or monoX choices will display the graphic in a window on your screen. It works very nicely if you have an XWindows server program on your PC or Mac, or if you are using a UNIX workstation with XWindows built in. For this to work, you must first startup your XWindows program, and then tell GCG where your Mac or PC is by typing from the genetics% UNIX prompt:
setenv DISPLAY my.ip.address:0where you substitute your machine's IP address for my.ip.address.
PSFILE AND HPFILE
These choices save the graphic to either a PostScript or HPGL file, respectively, that you can print later on any PostScript (e.g. Apple LaserWriter or HP LaserJet 4M) or HPGL printer (e.g. HP LaserJet 4M or Lexmark Optra). The "-time" in the file name indicates that it will automatically put a date/time stamp in the name of the file. To print the file later, download it to your PC or Mac and send it to your printer. During downloading and copying to the printer, remember that PostScript files are simple ASCII text files, whereas HPGL files are binary files. Printing instructions are included later in this discussion.
LW
With this option, the graphic is sent directly to a PostScript printer attached to your PC or Mac. It can be any PostScript printer, not just a LaserWriter. Make sure you set your terminal to print in transparent mode, and you may have to set up page protection from the printer's control panel to get it to print the entire graphic on one page.
LASER
With this option, the graphic is sent directly to a HPGL printer attached to your PC or Mac. It can be any HPGL printer, not just a LaserJet. Make sure you set your terminal to print in transparent mode, and you may have to set up page protection from the printer's control panel to get it to print the entire graphic on one page.
TEK
Some telnet programs, such as NCSA telnet, have built-in Tektronix emulation. With this choice, the graphic is displayed in a Tek window on your screen, similar to the XWindows example above. However, you don't need to set the DISPLAY variable with this choice.
PNGFILE
With this option the graphic is saved as a .png graphics file that can be displayed in a Web browser or imported into various graphics software. The "-time" in the file name indicates that it will automatically put a date/time stamp in the name of the file. To print the file later, first download it to your PC or Mac. .png files are binary or image files.
ADDITIONAL GRAPHICS COMMANDS
Other GCG graphics commands that are not included in the setplot menu customized for Genetics give you additional flexibility and a greater range of graphics output devices. These commands include: hpgl, postscript, tektronix, xwindows, regis, and sixel. Please read Chapter 5 of the GCG User's Guide for information about these additional commands.
GCG USER'S GUIDE
Chapter 5 of the GCG User's Guide is devoted to detailed descriptions of how to use the graphics capabilities of the GCG programs. You should read it for more detailed help on how to use graphics in GCG. In addition to the generic graphics setups available in the setplot menu that I have provided for you, it is possible to customize your own setup the way you like it, or for particular graphics printing or plotting devices that you might have available. Instructions on how to do this are included in Chapter 5 of the GCG User's Guide.
After using setplot to make your graphics choice, you can list your graphics setup with the showplot program. You can test your graphics setup with the plottest program, which plots a GCG test pattern. In HYGCGmenu, go into and execute plottest from the Display / Graphics menu. From the genetics% prompt, type plottest and press enter (if saving the plot to disk, use the -plot=filename option). Follow the instructions on the screen.
Most GCG results files are plain text that you can print on any printer. Some of the programs store graphics output in HPGL or PostScript files. Here are some examples that illustrate some of your options for printing these files. This is not an exhaustive list, and details will depend on what kind of computer you are using for a terminal, what kind of printer you have, what operating system is running on your computer, and what terminal software you are using, i.e. the number of combinations is astronomical.
Note also that you can use these methods for printing any files, not just files created by GCG.
1. Printing a simple text file from Genetics directly to your printer.
Use the GCG listfile command to print any text file on Genetics, e.g. this file, to the printer attached to your PC or Mac. Example:
genetics% listfile -noheading filename.txtThe -noheading command line option will prevent the header (name of the file, date) from printing at the top of the first page. You can use point-and-shoot inside HYGCGmenu if you don't want to type the commands.
2. Printing a simple text file from Genetics directly to a PostScript printer attached to your PC or Mac.
Use the GCG lprint command to print any text file in your directory on Genetics to a PostScript printer attached to your PC or Mac. Be sure to set your terminal to print in transparent mode before printing. Example:
genetics% lprint -noheading filename.txtThe -noheading command line option will prevent the header (name of the file, date, page number) from printing at the top of each page.
3. Printing a PostScript graphic file from Genetics directly to to a
PostScript printer attached to your PC or Mac.
Use the GCG listfile command with the -noheading option to print a
PostScript graphic file in your directory on Genetics to a PostScript
printer attached to your PC or Mac. Be sure to set your terminal to print
in transparent mode before printing. Also, you may have to set up page
protection from the printer's control panel to get it to print the entire
graphic on one page. Example:
First, download the file to your machine with FTP or Zmodem. Use ASCII
text mode to transfer a PostScript file. Then, on a PC, go to a DOS
prompt and copy the file to your printer attached to the appropriate
printer port, such as:
genetics% listfile -noheading graphics.ps
4. Downloading and then printing a PostScript graphics file on your PC
or Mac.
C:\ copy graphics.ps lpt1
Windows users may prefer to use the freeware drag-and-drop PrFile utility,
available at: http://www.lerup.com/printfile/.
On a Mac, use the
LaserWriter font utilities to send the file to the printer.
5. Downloading and then printing a HPGL graphics file on your PC.
First, download the file to your machine with FTP or Zmodem. Use BINARY
mode to transfer a HPGL file. Then, on a PC, go to a DOS prompt and
copy the file to your printer attached to the appropriate printer port,
such as:
C:\ copy /b plot.hp lpt1
Be sure to use the /b switch to send the binary file to the printer.
Windows users may prefer to use the freeware drag-and-drop PrFile utility,
available at:
http://www.lerup.com/printfile/.
6. Using the -figure command line switch.
GCG graphics programs can output their results into a "figure format" file that can then be used by the GCG figure program. To direct the output from a graphics program to a figure file, add the -figure switch to command line, as in this example with plottest:
plottest -figureThe result will be written to a file called plottest.figure. To write to a different filename, add the name to the switch like this:
plottest -figure=newname.figureYou can then display the graphic result by using the figure program:
figure plottest.figureThe figure program will display or print the graphic according to your GCG graphics environment that you have set using the setplot program as described above, such that you can display it on your terminal screen or print it on the printer attached to your PC or Mac. The advantage of this method is that you can display the result in several different ways without having to rerun the original graphics program. Experienced GCG users can also edit the figure file with a text editor to add additional content or to change the way the graphic will be displayed (for more information, see the section about the figure program in the GCG Program Manual).
CREATING AND PRINTING POSTSCRIPT PROGRAM MANUAL FILES
You may wish to print sections of the GCG Program Manual for your own use. The following example shows how to use the GCG red command to create a PostScript file for the section of the Program Manual about the pileup multiple sequence alignment program. The red command creates PostScript output that is identical to the printed versions of the GCG manuals that you can read in our libraries or purchase from the GCG company.
Activate gcg by typing gcg from the genetics% prompt. Next, activate the gcg support environment by typing gcgsupport. Then, from the genetics% prompt, type:
red Program_Manual:pileup.red -out=pileup.psand press enter (or use HYGCGmenu). This creates a PostScript file called pileup.ps, which can be downloaded to your PC or Mac and then copied to your printer as described above. Remember to use ASCII mode. To see what other sections are available for printing, look in the directory /gcg/gcg/gcgdoc/program_manual (you can use the HYBROW directory browser). There is a .red file coresponding to each section of the GCG Program Manual. NB: the PostScript files can be quite large.
Another option is to print out whole sections of the GCG manual at once. To print out the whole section that includes all programs that begin with the letter P (which would include pileup among them), type:
red GenDocDriver:p.driver -out=p.pswhich would create a PostScript file named p.ps containing all the program manual entries that begin with the letter P. To see what other sections are available for printing, look in the directory /gcg/gcg/gcgdoc/driver
PRINTING ASCII TEXT VERSIONS OF THE MANUALS
If you do not have a PostScript printer, or if you prefer plain text, you may use red to prepare files in ASCII text format instead of PostScript. For the above example, the command line would be:
red Program_Manual:pileup.red -ascii=pileup.txt -lml=4 -rml=75This creates an ascii text file called pileup.txt, with the left margin set to 4 characters and the right margin limit set to 75 characters. It will contain all of the textual information in that section of the manual, but will not contain any graphic figures. It can be printed on any printer attached to your PC or Mac. You can use the GCG listfile command as described above to print the ASCII text file directly to your printer without using ftp to transfer the file first (passthrough printing).
PRINTING THE ONLINE DOCUMENTATION
Most of the GCG Manuals are available online through the World Wide Web at http://www.genetics.wayne.edu/gcg/gcgmanual.html. You can use the "Print" feature of your browser to print sections of the GCG Manual or User's Guide for your own use.
SeqLab is the X Windows Graphical User Interface (GUI) for running the GCG programs. When you run the GCG programs from SeqLab, the output files are either text files, such as the results of a BLAST search, or are .figure files, which are files that the GCG figure program or SeqLab can display as graphics on your X Windows dislplay screen. You can print both kinds of output from SeqLab. The methods are similar to those for printing from the command line or from within HYBROW as described above, except that you can control the print jobs from within the GUI.
An important element for printing from GCG is to use a Telnet program with good printing capabilities, such as the shareware QVT/Net Terminal Program. Be sure to start seqlab from QVT/Net Terminal. Note also that you can use these methods for printing any files, not just files created by GCG.
1. Printing a simple text file from SeqLab directly to your printer.
You can print text files listed in the SeqLab Output Manager Window. The text file can be the output of any GCG program, or any text file that you add to the Output Manager Window with the "Add Text File..." button. To print the text file, click the name of the file in the list to highlight it, click the Print button, or first click the Display button and then click the Print button. Under "Output Format:" choose "ASCII". Under "ASCII print command:" choose or type:
listfile -noheadingThen click OK. That will use the GCG listfile command to print your text file, and the -noheading switch will prevent the header (name of the file, date) from printing at the top of the first page.
2. Saving a graphic from SeqLab to a PostScript file.
You can save any .figure file in the SeqLab Output Manager Window to a PostScript file. If the .figure file you want is not listed in the Output Manager Window, you can add it to the list with the "Add Graphics File..." button. To save the .figure graphic to a file, click the name of the file in the list to highlight it, click the Print button, or first click the Display button and then click the Print button. Under "Output Device:", choose "PostScript output saved as file graphics.ps", and under "Port or File" choose or type:
graphics.psor type the name under which you want the file saved. If you will be making multiple runs, you will want to save each file with a different filename. Next, click Proceed. The file will be saved in the folder in which you were located when you started SeqLab, such as your home or GCG folder. You can then print the file or download and print it as described for PostScript files above.
3. Printing a PostScript graphic file from Seqlab.
Fist save the graphic (i.e. .figure file) to a PostScript file as described just above. Then add the graphics.ps file to your Output Manager Window by clicking the "Add Text File..." button (remember that PostScript files are just text files that a PostScript printer can interprep and print as a graphic). Then print the file just as you did above for a text file using the listfile -noheading command, except that you must:
A. Set your terminal program to print in transparent mode.
B. Choose a PostScript-capable printer on which to print it.
4. Saving a graphic from SeqLab to a HPGL file.
You can save any .figure file in the SeqLab Output Manager Window to a HPGL file. If the .figure file you want is not listed in the Output Manager Window, you can add it to the list with the "Add Graphics File..." button. To save the .figure graphic to a file, click the name of file in the list to highlight it, click the Print button, or first click the Display button and then click the Print button. Under "Output Device:", choose "HPGL output saved as file plot.hp", and under "Port or File" choose or type:
plot.hpor type the name under which you want the file saved. If you will be making multiple runs, you will want to save each file with a different filename. Next, click Proceed. The file will be saved in the folder in which you were located when you started SeqLab, such as your home or GCG folder. You can download and print the file as described for HPGL files above. Remember that HPGL files are binary files.
[ Genetics Computer | GCG | Windows 95 | Online Guides | CMMG Home ]
Send comments to:
dwomble@genetics.wayne.edu
Copyright © 2003, David D. Womble.