SHELL 22.1

The "oa_pref" File

The oa_pref File

This file contains code-specific preferences that can be used to modify the behaviour of the software suite. It is optional and, where entries (or the whole file) are omitted, programs will revert to their default settings.

"oa_pref" Naming Convention and Locations

The file is called "oa_pref".

It is looked for in the following places in the order given:

  • The optional administration directory defined by the environmental variable ( $OA_ADMIN or $OA_ADMIN_xx where xx is the release number).
  • The site-wide installation directory defined by the environment variable ( $OA_INSTALL )
  • The user's home directory: $HOME (Linux) or %USERPROFILE% (Windows)
  • The current working directory

See Installation Organisation for an explanation of the directory structure.

All four files are read (if they exist) and the last preference read will be the one used, so the file can be customised for a particular job or user at will.
Files do not have to exist in any of these locations, and if none exists the programme defaults will be used.

On Linux:

$HOME on Linux is usually the home directory specified for each user in the system password file.
The shell command " printenv " (or on some systems " setenv ") will show the value of this variable if set.
If not set then it is defined as the " ~ " directory for the user. The command " cd; pwd " will show this.

On Windows:

%USERPROFILE% on Windows is usually C:\Documents and Settings\ <user id> \
Issuing the " set " command from an MS-DOS prompt will show the value of this and other variables.

Generally speaking you should put

  • Organisation-wide options in the version in $OA_ADMIN_xx and/or $OA_INSTALL,
  • User-specific options in $HOME / %USERPROFILE%
  • Project-specific options in the current working directory.

The file contains preferences for the SHELL (lines commencing shell*), THIS (lines commencing this*), D3PLOT (lines commencing d3plot*), PRIMER (lines commencing primer*)and REPORTER (lines commencing reporter*). All lines take the format <preference name> <preference value>.

The general copy of the preference file should be present in the $OA_ADMIN_xx and/or $OA_INSTALL directory. This should contain the preferences most suitable for all software users on the system.

An individual's specific preferences file can be stored in the individual's home area. This can be used to personally customise the software to the individual's needs.

Whenever one of the programs whose preferences can be stored in the oa_pref file is fired up, the program will take preferences first from the general preference file in the $OA_ADMIN_xx directory (if it exists) then the $OA_INSTALL directory, then from the file in the user's home area, then from the current working directory.

Preferences defined in the general oa_pref file can be modified in the user's personal file but they can't be removed by it.

From version 9.4 onwards preferences can be locked. If a preference is locked it cannot be changed in an oa_pref file in a more junior directory. To lock a preference use the syntax 'shell#' rather than 'shell*' .

An example of the file is shown below to illustrate the content of the file

# Preferences file for software.
#
# Preferences for SHELL
shell*queue_cpu: 0
#
# Preferences for THIS
this*laser_paper_size: A4
#
# Preferences for D3PLOT
d3plot*overlay_colour: grey
#
# Preferences for PRIMER
primer*overlay_mode off