first previous next last contents

The .gaprc file

Most of the default answers to questions in gap4, along with several other parameters such as colours, are externally configurable. The complete set of configurations can be found in the $STADTABL/gaprc file. In the future a proper interface for editing this file will be available from the main Options menu.

The format of commands in this file are:

"#" followed by anything is a comment.

"set_def VARIABLE value" sets the parameter "VARIABLE" to the value "value". Note that value must be enclosed in double quotes if it contains spaces.

"set_defx temp VARIABLE value" sets a parameter in a temporary list named "temp". This has no effect unless it is then used within a set_def command. In this case we use "$temp" as the "value" parameter of a set_def command.

An example follows:

set_defx defs_f_or_l_in WHICH.NAME      "Input from"
set_defx defs_f_or_l_in WHICH.BUTTONS   {list file}
set_defx defs_f_or_l_in WHICH.VALUE     2

set_def READPAIR.INFILE $defs_f_or_l_in

This sets the defs_f_or_l_in list to contain WHICH.NAME, WHICH.BUTTON and WHICH.VALUE parameters. It then sets READPAIR.INFILE.WHICH.NAME (etc). The above is equivalent to:

set_def READPAIR.INFILE.WHICH.NAME      "Input from"
set_def READPAIR.INFILE.WHICH.BUTTONS   {list file}
set_def READPAIR.INFILE.WHICH.VALUE     2

Typically users will only need to use set_def commands. The most likely parameters to change (cutoffs and colours) are held at the top of the gaprc file.

For users to override the standard defaults they do not need to edit the $STADTABL/gaprc file. Rather they can create a $HOME/.gaprc or a .gaprc (ie a file named .gaprc in the current directory). Definitions in $HOME/.gaprc override those in the $STADTABL/gaprc file. Definitions in the .gaprc file in the current directory override both the $STADTABL/gaprc and $HOME/.gaprc definitions.

For example a user may decide they prefer a different colour for base type A in the trace display. This may be particularly helpful for colour blind users. The user can create a .gaprc file in their HOME directory containing (eg):

set_def TRACE_DISPLAY.A_COLOUR          yellow

This change will apply to all databases that the user accesses. The user may also have a project where the default consensus_cutoff needs changing. In this case a .gaprc file should be created in the same directory as the project, containing the line (eg)

set_def CONSENSUS_CUTOFF        100.00

As a final example of configuration, note that the help system can be controlled to use either the inbuilt html browser, or start up and communicate with an external netscape viewer. This is controlled by defining the variable HELP_PROGRAM to be tcl-external, tcl-internal or netscape. The difference between the internal and external tcl viewers are whether the help program is started as a separate UNIX process. For an example of using netscape add the following to your .gaprc.

set_def HELP_PROGRAM            netscape

Note that if any of the gaprc files are not of a valid format then gap4 will fail to start up. The likely response will be several error lines ending in something like invoked from within "SetDefaults". Such poor error handling is a temporary measure.


first previous next last contents
This page is maintained by James Bonfield. Last generated on 29 April 1996.
URL: http://www.mrc-lmb.cam.ac.uk/pubseq/manual/gap4_24.html