first previous next last contents

The .gaprc and .tk_utilsrc Files

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. The same technique applies for all other .rc files, including .tk_utilsrc, .niprc, .siprc and .trevrc.

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 .tk_utilsrc file in their HOME directory containing (eg):

set_def TRACE.COLOUR_A          yellow

This change will apply to all Gap4 databases that the user accesses and to all uses of Trev. The user may also have a Gap4 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        1.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 .tk_utilsrc file.

set_def HELP_PROGRAM            netscape

The use of .tk_utilsrc instead of .gaprc reflects the fact that the help is driven by a component of the package common to several programs. Adding the above definition to the .tk_utilsrc file changes the behaviour of help in Gap4, Sip4, Nip4 and others.

Note that if any of the `rc' 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 2 Febuary 1999.
URL: http://www.mrc-lmb.cam.ac.uk/pubseq/manual/gap4_142.html