Using Programs

[ Program Manual | User's Guide | Data Files | Databases ]

Table of Contents

Overview

Working with Programs

Starting Programs

Answering Program Prompts

Stopping Programs

Using Program Parameters

Rules for Using Command-Line Parameters

Customizing Program Analysis

Using Program Parameters

Displaying a Summary of Program Parameters

Using Global Parameters

Using Global Switches

Using Command-Line Control

Suppressing Program Prompts

Working with Text Output Files

Redirecting Program Output to a Device

Directing Output to a File

Directing Output to Your Screen

Directing Output to a Printer

Printing Text Output Files

Using the Batch Queue

Submitting Jobs to the Batch Queue

Checking If Your Batch Job Completed

Deleting a Batch Job

Troubleshooting a Failed Batch Job

Customizing Batch

For Advanced Users

Redirecting Output to Another Program

Using Command-Line Initialization Files

Creating a Command-Line Initialization File

Using a Command-Line Initialization File

Using Foreign Commands (Symbols)

Defining Foreign Commands

Using Foreign Commands

Working with Command Procedures

Creating a Command Procedure

Using a Command Procedure


Overview

[ Top | Next ]

This chapter teaches you the basics of working with Wisconsin Package programs. It provides information that you must know to take advantage of and effectively use the many options the Package offers. For information about specific programs, refer to the Program Manual or online help.

In this chapter, you'll learn how to


Working with Programs

[ Previous | Top | Next ]

Note: For a list of functionally grouped programs in the Wisconsin Package and their descriptions, see Appendix A, Short Descriptions.

This section teaches you how to

Starting Programs

[ Previous | Top | Next ]

To run Wisconsin Package programs:

  1. Make sure you have initialized the Wisconsin Package.

    If you have not initialized the Package, or you are not sure if the Package is initialized, type $ GCG (or the command used at your site to initialize the Wisconsin Package). Some sites set up users' logins to automatically initialize the Wisconsin Package. When the Package is initialized, the Wisconsin Package banner scrolls on your screen. For more information, see "Initializing the Package" in Chapter 1, Getting Started.

  2. Type the name of the program on the command line and press <Return>. The system starts the program, displaying a short summary of its purpose and prompting you for information.

    After you become familiar with Wisconsin Package programs, you may want to customize the analysis performed by the program by adding parameters on the command line after the program name. For more information, see "Using Program Parameters" in this chapter.

    TIP - You can abbreviate some program names. For example, Profile is the unique abbreviation for the program ProfileMake.

    When a command is provided in this documentation set, the entire command is shown, but the unique abbreviation is bold, for example ProfileMake.

Answering Program Prompts

[ Previous | Top | Next ]

Most programs in the Wisconsin Package prompt you for information: they usually require a sequence for input, a name for an output file, the beginning and ending positions of the portion of sequence you want to use, and other pieces of information particular to individual programs.

You can answer most program prompts with a yes or no, a number, a letter, or a filename. Some prompts display several alternatives for you to choose from. The following example displays some of the various types of prompts.

Figure 1

Program Defaults

When appropriate, Wisconsin Package programs supply default answers for program prompts. You can accept the default answer or type a different response. The default answer is always displayed between parentheses and asterisks. In the example above, default answers are provided for many of the prompts, for example Begin (* 1 *), End (* 11375 *), Enzyme (* * *), (* t *), and (* gamma.map *).

To answer program prompts:

Choose from the following.

Note: If you press <Return> without typing an answer in response to a prompt which does not have a default, the program will stop.

Stopping Programs

[ Previous | Top | Next ]

To interrupt or quit a program prematurely:

Choose from the following.


Using Program Parameters

[ Previous | Top | Next ]

So far in this chapter you've learned how to start programs and interactively answer their prompts. This section teaches you how to use program parameters, or modifiers of the program command. Using parameters, you can bypass interactive prompts or use additional optional parameters to change the way programs analyze your data or display the analysis results.

This section teaches you

Rules for Using Command-Line Parameters

[ Previous | Top | Next ]

You let the computer know what parameters you want to use by typing them on the command line after the program name. The command line is what you type after the system prompt ($) to run a program or command. You have a number of options for running programs from the command line. If you are a new user, you may want to type just the program name, without any parameters, and respond to the program prompts. Once you become more familiar with the Package, you will probably also type one or more required or optional parameters to customize your analysis. Or you might want to bypass the program's prompts by just typing the program's minimal syntax.

You do not need to use parameters; each program performs a standard analysis if you simply type the program name and answer the program prompts. Using parameters, however, gives you more control over a program and lets you customize your analysis.

Parameters

Parameters modify the action of the command. Some parameters accept values. Consider the following example:

Figure 2

All qualifiers are preceded by a slash (/). Some, though not all, qualifiers accept values, which modify the qualifier. Do not insert spaces in between a qualifier and its value.

Command-Line Syntax

Command lines have a special syntax. Below is an example of the syntax used within the Wisconsin Package:

Figure 3

Program Name or Command. The Wisconsin Package program or DCL command you want to run.

Unqualified Parameter. An unqualified parameter is a value specified without a qualifier. You can specify input and output filenames without qualifiers, as in the example above, where GGammaCod.Seq is an input file. You can use the command-line qualifiers /INfile= or /OUTfile= to specify input and output files, respectively. Consider the following example:

$ Map /INfile=GGammaCod.Seq /OUTfile=GGammaCod.Map /Default
$ Map GGammaCod.Seq GGammaCod.Map /Default

Notice that the first command line uses qualifiers for the input and output files and the second does not. Both, however, perform the same action; that is, they both use GGammaCod.Seq as the input file and to write the output into a file named GGammaCod.Map.

The order in which unqualified parameters appear on the command line is significant to how the program interprets them. Always provide input filename(s) first, followed by output filename(s).

Note: In those cases where you can type an unqualified parameter, the documentation displays the optional qualifier in brackets (for example [/INfile1=]). Do not type the brackets.

Command-Line Guidelines

Because command lines have a special syntax, there are a number of guidelines you should keep in mind as you work with them:

Customizing Program Analysis

[ Previous | Top | Next ]

Wisconsin Package programs offer flexibility in customizing your analyses by allowing you to modify the way a program processes your sequence information. Each program supports a number of parameters, or modifiers of the command. These parameters change the way the programs analyze your data.

Most Wisconsin Package programs provide you with a summary of the available command-line parameters. Each command-line summary is subdivided by the following headings: Minimal Syntax, Input File(s), Prompted Parameters, Local Data Files, and Optional Parameters. Consider the following command-line summary for the Gap program:

Figure 4

Minimal Syntax. Shows the minimal command line you can type to suppress the program prompts and all interaction by you. The minimal command line sets the essential parameters, that is those for which the program has no default value and without which it cannot run. A default value is one that a program uses if you do not supply one. Most programs prompt you for an input file or sequence for which there is no default value.

Prompted Parameters. Shows all parameters not included on the Minimal Syntax line that are required by the program to run. You can bypass these parameters by using the /Default parameter, which tells the program to use defaults for those parameters that have them. If you do not supply the required parameters or if you do not use /Default on the command line, the program will prompt you for them.

Local Data Files. Lists the local data files the program uses by default. Local data files are non-sequence data files containing information such as restriction enzyme names and recognition sites. You can change the local data files a program uses to tailor your analyses. Alternative data files for some programs are available; for many programs you can create your own data files as well. For more information, see Chapter 4, Using Data Files.

Optional Parameters. Lists additional parameters you may want to include on the command line to customize your analyses. Optional parameters offer you flexibility in manipulating a program. However, they are not required for the program to function.

Note: You can set optional parameters only from the command line; the program does not prompt you for them.

Using Program Parameters

To use program parameters:

Type /Qualifier=Value on the command line following the program name, for example $ Map /INfile=GGammaCod.Seq /Default. You can include as many parameters on the command line as you need to run your analysis.

To extend long commands onto a second line, type a dash (-) at the end of the preceding line, press <Return>, and continue typing the rest of the command line.

For more information, see "Rules for Using Command-Line Parameters" in this section.

Displaying a Summary of Program Parameters

You can find a summary of each program's available command-line parameters either in the Program Manual or in the Command-Line Summary. However, an easier way to see the parameters that are available for a particular program is to display them online when you run the program.

To display a list of command-line parameters online:

Choose from the following.

Using Global Parameters

You can find parameters specific to each program fully described in the "Optional Parameters" topic in the entry for each program in the Program Manual. In addition, there are a number of parameters that are global within the Package; that is, they can be used by all Wisconsin Package programs. To avoid repetition, these optional global parameters are not displayed in the "Command Line Summary" in the online or printed documentation.

A separate set of global parameters are also available when you run graphics programs. For more information, see "Graphic Global Parameters" in Chapter 5, Using Graphics.

To use global parameters:

Add them to the command line just as you would a program parameter, for example $ Map Gamma.Seq /CHEck.

Global Parameters Description
/CHEck Prints a summary of the available command-line parameters and prompts you for any additions you may want to make to the command line.
/Default Tells the program to suppress all interaction and to use the program's default values for every parameter that is not explicitly defined on the command line.
/DOCLines=6 Sets the number of lines of documentation that Wisconsin Package programs copy from input files to output files. This option sets a program to copy any number of lines you choose. The default is six lines.
/FASTA Sets a program to accept sequences in FastA format.
/FAITHful Sets a program to copy all of the input file's documentary heading, including blank lines, into output files.
/INITialize=Initialization_File.Init Names the file the program should use as a command-line initialization file (see "Using Command-Line Initialization Files" in the "For Advanced Users" section in Chapter 3 of the User's Guide).

If you do not specify the Initialization_File.Init, the program will use the file with a name the same as the program and the file extension .Init, for example $ Map /INIT uses the file Map.Init.
/NODOCumentation Suppresses the short banner that introduces each program.
/QUIet Sets a program not to ring the terminal bell, even when an error occurs.
/STAden Sets a program to accept sequences in Staden format.

Note: You can specify many of the above options to be in effect for an entire session using global switches. For more information, see the "Using Global Switches" topic below.

Using Global Switches

Global switches change the behavior of programs in the same way that command-line parameters do. However, unlike command-line parameters, which affect only the current program you are running, global switches affect every program you run until you log out.

You activate a global switch by typing its name on the command line, for example $ ComCheck. You can turn off a global switch by typing its complementary switch, for example $ NoComCheck.

Note: Command-line parameters always override global switches. For example, let's say at the beginning of your current work session you set the global switch $ DocLines 6. You could override that global switch for a single program by adding /DOClines=10 to the command line after the program name.

TIP - If you find that you consistently use one or more global switches each time you log in, include them in your GCGMyInit.Com file.

Global switches, their descriptions, and their complementary switches are listed below.

Global Switch Description Complementary Switch
$ ComCheck Displays a summary of command-line parameters and displays the prompt "Add what to the command line?" You can type the additional parameters you want at that time. $ NoComCheck
$ NoBeep
$ Quiet
Turns off the bell-ringing function of all programs. $ Beep
$ Noisy
$ NoDoc
$ Terse
Turns off the documentation that appears when you use Wisconsin Package commands. This documentation may be tedious if you are familiar with the programs or if your connection to the computer is slow. $ Doc
$ Verbose
$ SeqFormat Staden
$ SeqFormat FastA
Sets your programs to accept sequences from files in Staden or FastA format. $ SeqFormat GCG
$ DocLines=10 Sets the number of lines of documentation that Wisconsin Package programs copy from input files into output files. The default number of non-blank lines copied is six. $ DocLines=6
$ ModifyBatch Lets you define the time at which programs that accept the /BATch parameter are submitted to the batch queue. $ ModifyBatch
$ NoPlotCheck Turns off the report of your current graphics configuration that appears when you run a graphics program. $ PlotCheck
$ PlotTerm Sets your terminal to "NoBroadcast" so that if a plotter is attached to your terminal, it will plot without the confusion of system messages that can destroy the plot. This global switch also sets and verifies that the plotter is connected to the terminal and not some other port. $ NoPlotTerm
$ GIF*
$ GKS
$ HPGL
$ PNG
$ PostScript
$ Regis
$ Sixel
$ Tektronix
$ XWindows
Lets you define the type of graphics output device you want to use and the port to which it is connected. (See "Configuring Graphics Languages and Devices" in Appendix C, Graphics in this manual for descriptions of these devices.) $ GIF*
$ GKS
$ HPGL
$ PNG
$ PostScript
$ Regis
$ Sixel
$ Tektronix
$ XWindows
$ V132 Sets your VT100 or VT220 terminal to show 132 characters per line instead of 80. $ V80

*The GIF graphics driver is an optional product that is sold separately from the Wisconsin Package. For more information, see "GIF (Graphics Interchange Format)" in the "Configuring Graphics Languages and Devices" section of Appendix C, Graphics.

Using Command-Line Control

[ Previous | Top | Next ]

Command-line control is based on the assumption that much of your work with the computer and the Wisconsin Package involves the repetition of similar commands. For instance, if you run the same analysis repeatedly, you may want to bypass the program's interactive prompts. To do so, you must supply all of a program's essential parameters--that is, those which the program must have to run to completion without your interaction. In addition you can specify optional parameters.

To use command-line control, include one or more parameters after a program name, supplying those necessary to suppress the program's prompts. To extend long commands onto a second line, type a dash (-) at the end of the preceding line. Parameters must be preceded by a slash (/); do not type a space in between the slash (/) and the parameter. Many parameters require values, for example /BEGin=1 /END=1000, although not all do, for example /BATch. Values can include filenames, numbers, and character strings.

Note: Not all programs support command-line control. See the "Command Line Summary" for each program in the Program Manual. The "Minimal Syntax" line lists the minimum command line you can type to suppress all program prompts.

Suppressing Program Prompts

There may be times when you want to suppress program prompts. For instance, if you want to run a program at night in the batch queue (see "Using the Batch Queue" in this chapter), you must create a command procedure that includes the required command-line parameters. The parameters must answer all the program prompts and allow the command procedure to run to completion without your interaction. Otherwise, the program will stop when it reaches the first unanswered prompt.

To suppress program prompts:

Answer all of the program's questions by using parameters on the command line. Use the following guidelines:


Working with Text Output Files

[ Previous | Top | Next ]

Note: If you are using a program that produces graphics output, see Chapter 5, Using Graphics.

This section teaches you how to

Redirecting Program Output to a Device

[ Previous | Top | Next ]

Programs typically direct their output to a file. However, you can redirect the output to your terminal screen or a printer. If you do so, the output is not saved in a file for future use.

Directing Output to a File

Most Wisconsin Package programs write a text file with the output from the program. They ask the question "What should I call the output file?" and often provide a default filename consisting of the name of the input file with an extension of the program name. For example, if you run the program Map with the input file Gamma.Seq, the program provides Gamma.Map as the default output filename.

If you save program output to a file, you can view it on your screen or print it at any time.

To direct output to a file:

Type the name of an output file in response to the program prompt "What should I call the output file?" If you are using command-line control, type /OUTfile=Filename. The program writes its results into the file you named in your current directory.

In some cases output files act as input to other programs. In addition, you can edit most output files with any text editor, allowing you to customize your files for other uses. For more information about working with output files, such as how to view and edit them, see "Working with Files" in Chapter 1, Getting Started.

Directing Output to Your Screen

While almost all Wisconsin Package programs write their results into a text file, you also can direct the output to your terminal screen.

To direct output to your screen:

Type Term in response to the program prompt "What should I call the output file?" If you are using command-line control, type /OUTfile=Term. The program results appear on your screen.

Note: When you direct output to your screen, no output file is saved. Also, note that some programs, such as Assemble, CodonFrequency, Translate, FromIG, and ToIG, do not let you direct output to your terminal screen.

Directing Output to a Printer

To send an output file directly from a program to a queued printer:

Type | Print /Queue=queue_name in response to the program prompt "What should I call the output file?" The program sends the output to the default printer. See your system manager for more information on how to send output directly from a program to a printer and on what printers are available to you.

Note: When you direct your program output directly from a program to the printer, no output file is saved.

Printing Text Output Files

[ Previous | Top | Next ]

All Wisconsin Package programs produce an output file of results. If the output file contains text or ASCII, you can print it using a number of utilities. If the output file contains graphics, see Chapter 5, Using Graphics.

To print an output file:

Choose from the following.


Using the Batch Queue

[ Previous | Top | Next ]

Most Wisconsin Package programs run in a few seconds. However, some programs, such as the database searching programs, can take several minutes to several hours to run. In such cases, you may want to run the programs in the batch queue. After you submit a program to run in the batch queue, your terminal is free for other work. Also, if your system charges for resources, it often will cost less to run programs in the batch queue.

This section teaches you how to

What is the batch queue?

The batch queue is a list of batch jobs waiting to execute. When you submit a job to the batch queue, it is added to the end of the line of other jobs waiting to execute. Your job will execute after any jobs preceding it have completed.

When you submit a job to batch, you are telling the system to run the command for you as a separate process. While the program you submitted is either running in the background or waiting to run, your terminal is free to work on other jobs. Or, you even can log off the computer and your program will continue to run.

Batch Job Status

When you submit a job to the batch queue, the system displays its name and status on your screen. A just-submitted job can have one of the following statuses:

Started - The job is currently executing.
Pending - The job will execute after all jobs preceding it have completed.
Holding - The job will execute at the time displayed in the message.

/Batch Parameter

The Wisconsin Package provides the /BATch parameter for select programs to make it easy to submit programs to the default batch queue. As of Version 10.0, these programs are

BLAST FrameSearch ProfileSearch
CoilScan GCGToBLAST SSearch
Compare GelMerge StringSearch
FastA MFold TFastA
FastX PAUPSearch TFastX
FindPatterns PileUp WordSearch
FrameAlign Prime


GCG sets the /BATch parameter to execute a job as soon as possible. However, your system manager may have modified the /BATch parameter to execute jobs at a later time. See your system manager for more information.

Batch Job Example

The following is a typical example of a program submitted to the batch queue using the /BATch parameter.

Figure 5

System Messages

Note the system messages in the batch job example above:

** fasta will run as a batch or at job.

This Wisconsin Package message confirms that this program was submitted to the batch queue.

** fasta was submitted using the command: "SUBMIT/NOPRINT/NOTIFY"

This Wisconsin Package message identifies the DCL command used to submit your program to the batch queue. If the command you see is different than the one in the example, your system manager has changed the /BATch parameter.

Note: Because you or your system manager are able to modify the command to submit jobs to batch, your message may read differently.

Job FASTA_100454075460_1 (queue BINGS1$SYS$BATCH, entry 322) started on BINGS1$SYS$BATCH

This system message displays the job name, status, and queue the batch job was submitted to. The job name consists of the name of the program, an underscore ( _ ), and a unique job number. The system uses the job name to report the status of the job in messages displayed on your screen and in the log file.

Log Files

As your job executes in the batch queue, the system writes a log file in your home directory. This log file contains the messages normally displayed on your screen when you run the program interactively. The name of the log file is the batch job name with the .Log extension. To monitor the progress of the program, you can view the log file while the job is running by entering $ Type Filename, for example $ Type FastA_134935.Log.

Batch Job Results

When you submit a job to the batch queue, the program creates two files in your current directory. Both files have the same base name (which is the name of the program), an underscore (_), and the job number, for example Fasta_100454075460_1. One of the two files has the extension ".Init"; this file contains the parameters you are using to run the program. The other file, which has the extension ".Com", contains the command procedure that runs the program. When your job completes, the system deletes both files from your directory unless you add /NODELete to the program command line.

You can find the results of your batch job in the output filename you specified. Unless you specify otherwise, the output file appears in the directory you were in when you submitted the program. If the batch job fails or is interrupted, the .Init file and the file that has the extension .Com may not be deleted. If this is the case, you can delete the files from the directory.

Submitting Jobs to the Batch Queue

[ Previous | Top | Next ]

Some programs support the command-line parameter /BATch to submit themselves to the batch queue. For those programs that do not support /BATch, you can write command procedures to submit them to the batch queue.

To submit a job to the batch queue:

Choose from the following.

Checking If Your Batch Job Completed

[ Previous | Top | Next ]

If you submitted a job to the batch queue with /BATch, and the batch job completes before you log off of the system, the system will display a message on your screen telling you the job has completed, for example

Job FASTA_100454075460_1 (queue BINGS1$SYS$BATCH, entry 322) completed .

However, if you logged out of the system before the job completed, you will not see this message.

To check if a batch job completed:

Type $ Show Entry /Batch to display the status of all batch jobs you have submitted. Jobs can have a status of started, pending, or holding. If a job does not appear in response to the command, it has completed.

Deleting a Batch Job

[ Previous | Top | Next ]

At some point in your work with submitting jobs to the batch queue, you may want to cancel an already submitted job. For instance, what if you submitted a FastA job to batch, but then realized you specified the wrong sequence? You can delete the job from the batch queue.

To delete a job from the batch queue:

  1. Type $ Show Queue /Batch to display the unique number assigned to each job in the batch queue. For example

    Batch queue $SYS$BATCH, available, on BINGS1::

    Entry  Jobname       Username   Status
    ----- ------------ -------- -------
    350 FASTA_165843 SMITH WAITING

  2. Type $ Delete /Entry=Job_number to delete the job from the batch queue, for example $ Delete /Entry=350.

Troubleshooting a Failed Batch Job

[ Previous | Top | Next ]

A batch job may fail for a number of reasons: perhaps you forgot to specify a value for a parameter that did not have a default, or the program stopped running because of memory problems, or maybe you provided a filename that did not exist, among other reasons.

There are two ways to troubleshoot a failed batch job. One way is to check the batch job's log file. Every batch job creates a log file which it writes in your login directory. The log file contains the messages normally displayed on your screen when you run the program interactively. The name of the log file is the batch job name with the .Log extension. You can determine why a batch job failed by examining its log file.

A second way to troubleshoot a failed batch job is to run the program again, sending the system and error messages to your screen while it runs. These messages may be more meaningful than the .Log file messages.

To troubleshoot a failed batch job:

Note: If you are submitting a job to the batch queue using the /BATch parameter, do steps 1 and 2. If you are submitting a command procedure to the batch queue, do only step 2.

  1. Run the program in batch again, adding /NODELete to the command line.

    This parameter prevents the batch program's command procedure (.Com file) and initialization file (.Init file) from being deleted after the program completes.

  2. After the batch job completes (presumably failing), type the following:

    $ Set Verify
    $ @Filename.Com

    where Filename is the name of the batch job command procedure. This command runs the batch command procedure again, displaying all the system and error messages as the program runs. You can often determine why and where a batch job fails by examining these messages.

Customizing Batch

[ Previous | Top | Next ]

You can change the time a batch job runs and the queue it runs in with the ModifyBatch utility. ModifyBatch allows you to change the time and queue for each separate program or for all programs that support the /BATch parameter. Your changes to batch stay in effect until you log off of the computer.

To customize the time and queue to submit a batch job:

  1. Type $ ModifyBatch. The screen displays the programs supporting the /BATch parameter and prompts you "Modify submit command for which program?"

    Figure 6

  2. Type the name of the program for which you want to change the batch time and queue, or type Generic to change the time and queue for all the programs. The program prompts you "Run program after what time?"

  3. Type the time at which you want to run the program(s). For example, to run a program at 1:00 a.m., type 1:00. For help on specifying a time, type ? and press <Return>.

    The program prompts you "Run program on which queue?" and displays a list of available queues at your site.

  4. Type the name of the queue you want, or press <Return> to accept the OpenVMS default batch queue. If you previously defined a queue for the program you are redefining batch for, the batch queue will remain the same.

    The screen again displays the programs supporting the /BATch parameter. The changes you have made to ModifyBatch appear in square brackets to the right of the program name.

  5. Type the name of the next program for which you want to modify batch, or type Quit to exit the program.

TIP - If you run ModifyBatch each time you log in to the Wisconsin Package, you can define the commands in your login to automate the batch customization. To do so, type the answers to each prompt on a single line in your GCGMyInit.Com file. For example, to modify FastA to run at midnight in the batch queue, you could add the line $ ModifyBatch FastA 00:00 to the file. For more information about adding commands to your GCGMyInit.Com file, see "Working with Command Procedures" in the "For Advanced Users" section of this chapter.


For Advanced Users

[ Previous | Top | Next ]

This section covers advanced tasks you may want to perform after you have become familiar with the basics of running Wisconsin Package programs. This section teaches you how to

Redirecting Output to Another Program

[ Previous | Top | Next ]

You typically direct where your program output goes; that is, you might direct output to a file, to your screen, or to a printer or plotter (see "Redirecting Program Output to a Device" in this chapter). You also can direct output from one program as input to another program. For example, the Compare program writes an output file that is input to the DotPlot program. To redirect the Compare output to the DotPlot program, you could type "| DotPlot /Default" in response to the program prompt "What should I call the output file?" The | is a pipe that takes the output from the current program or command and passes it to a second command following the |. This second command and its parameters must suppress any interactive prompts. You must enclose the | and its following command in double quotation marks (").

Note that although piping the output from one program into another saves you some time, no output file is saved in the process.

To redirect output to another program:

Type "| Program /Default" in response to the prompt "What should I call the output file?" To redirect output to another program using command-line control, add /OUT="| Program /Default" to the command line.

Using Command-Line Initialization Files

[ Previous | Top | Next ]

What is a command-line initialization file?

A command-line initialization file is a separate file in which you define parameters that you want to use consistently with a particular program. Let's say you consistently run the program Map with the parameters /ENZymes=* /MENu=s /SIXbase /WIDth=100. Instead of typing those parameters each time you run the Map program, you can type them once in a command-line initialization file.

All Wisconsin Package programs that have command-line control let you define parameters in command-line initialization files. You can type parameters on the command line to override those defined within the command-line initialization file.

Why would I want to use one?

Command-line initialization files are advantageous if you want to ensure that you consistently run a program with the same parameters each time. They are especially appropriate to use when you have a number of parameters you want to consistently use. Another advantage is that, because a command-line initialization file is simply a file, you can modify it with a text editor.

Note: If you have a limited number of parameters you want to use, you may want to consider defining them in a foreign command. For more information, see "Using Foreign Commands" in the "For Advanced Users" section of this chapter.

Creating a Command-Line Initialization File

To create a command-line initialization file:

  1. Open a new file with the text editor of your choice, for example EDT or EVE.

  2. Type the appropriate information. A command-line initialization file consists of an optional documentary heading, a dividing line ending with two adjacent periods (..), and the parameters you want added to the command line.

    Below is an example of a command-line initialization file for the Map program.

    Figure 7

  3. Save and exit the file.

    If you save the file with the name of the program and the extension .Init, for example Map.Init, the corresponding program automatically will use the file each time you run the program from that directory. If you do not want to use the initialization file every time you use the program, save the file with a different name.

Using a Command-Line Initialization File

You can name command-line initialization files so that programs automatically use them each time they run, or you can manually specify the initialization file on the command line when you run the program. Note that in either case, you can override a parameter you specified within the initialization file by adding that parameter and its new value to the command line. Command-line parameters always override parameters defined within a command-line initialization file.

To specify a command-line initialization file for a program:

Choose from the following.

Using Foreign Commands (Symbols)

[ Previous | Top | Next ]

What is a foreign command?

A foreign command redefines a command as a symbol to abbreviate it and make it simpler to remember. For instance, let's say you switch between two graphics devices frequently. Each time you switch to a different device, you must redefine your graphics configuration. Instead of running through the graphics configuration commands each time, however, you can define a symbol to represent each command. Then, to switch between devices, you have to type only the symbol instead of the entire graphics configuration command. (For more information on graphics devices, see Chapter 5, Using Graphics.)

Note that parameters typed on the command line always override those defined within the foreign command.

Why would I want to use one?

Foreign commands and symbols are advantageous if you want to define a shorthand abbreviation for a command and its parameters. They also ensure that you consistently run a program with the same parameters each time. They are especially appropriate when you have a limited number of parameters you want to consistently use. When you have a large number of parameters you want to use with a command, define them in a command-line initialization file.

Defining Foreign Commands

If you define a foreign command at the operating system prompt, it will be in effect until you log out. To save your foreign command from one session to the next, add it to your GCGMyInit.Com file.

To define a foreign command (symbol):

  1. Open your GCGMyInit.Com file in the text editor of your choice, for example EDT or EVE.

  2. Type the foreign command(s). Foreign commands use the following syntax: $ Symbol_Name :== Command_Line.

    For example, let's say you frequently switch between two graphics devices, an Apple LaserWriter printer and a Tektronix graphics terminal. To create a foreign command for each device to switch between them quickly and efficiently, you might type the following:

    $ LW :== 'PostScript' LaserWriter TTX7:
    $ TK :== 'Tektronix' Tek4207 Term:

    Keep the following guidelines in mind as you create a foreign command:

  3. Save and exit the file.

  4. Test the foreign command to make sure it works. Follow these steps:

    1. Type $ @GCGMyInit to rerun the file.

    2. Type the foreign command you assigned, for example $ LW.

      If the foreign command does not run as you expect it to, edit the file as necessary and test it again.

      Note: To display the definition of a foreign command, type $ Show Symbol Foreign_Command, for example

      $ Show Symbol LW
      LW == "@GenCom: POSTSCRIPT LASERWRITER TTX7"

Using Foreign Commands

To use a foreign command:

Type the symbol you defined, for example $ LW. The program or command runs with the parameters you specified.

Working with Command Procedures

[ Previous | Top | Next ]

What is a command procedure?

A command procedure is a file that contains DCL or program commands. It mimics exactly what you would type if you ran a command interactively. You can use command procedures to execute commands and set up symbols and logical names. For example, your Login.Com and GCGMyInit.Com files are command procedures.

Why would I want to use one?

Command procedures are advantageous for customizing your login environment. For instance, in your Login.Com file you can define that the Wisconsin Package is automatically initialized each time you log in. Or, in your GCGMyInit.Com file you can set up your graphics configuration and define your MyData logical name so that each time you log in, these commands are defined for you. Command procedures are also useful when you want to submit programs that do not support the /BATch parameter to a batch queue.

Creating a Command Procedure

To create a command procedure:

  1. Open a file in the text editor of your choice, for example EDT or EVE.

  2. Type the appropriate commands and comments. For example, let's say you want to submit the StringSearch program to the batch queue. To do so, you need to create a command procedure similar to the following:

    Figure 8

    Keep the following guidelines in mind as you create command procedures:

  3. Save the file with a .Com extension and exit the text editor.

  4. Test the command procedure on a short sequence by running it interactively. Type an at symbol (@) followed by the filename of the command procedure, for example $ @StringSearch.Com. If the command procedure does not run without error or as you expect it to, edit the file as necessary and test it again.

    Note: To break out of a command procedure before it is done running, press <Ctrl>C.

    Testing a command procedure until it works correctly will prevent you from using excess CPU time on one that doesn't work.

Using a Command Procedure

To use a command procedure:

Choose from the following.


[ Program Manual | User's Guide | Data Files | Databases ]


Documentation Comments: doc-comments@gcg.com
Technical Support: help@gcg.com

Copyright (c) 1982, 1983, 1985, 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1997, 1998 Genetics Computer Group Inc., a wholly owned subsidiary of Oxford Molecular Group, Inc. All rights reserved.

Licenses and Trademarks Wisconsin Package is a trademark of Genetics Computer Group, Inc. GCG and the GCG logo are registered trademarks of Genetics Computer Group, Inc.

All other product names mentioned in this documentation may be trademarks, and if so, are trademarks or registered trademarks of their respective holders and are used in this documentation for identification purposes only.

Genetics Computer Group

www.gcg.com