first previous next last contents

Integration with External Databases

During the first few stages of processing there are a number of items of data required to be known by pregap. The current descriptions of these state that questions are asked (if need be) for the required information, and for others variables are processed (from the .pregaprc files or environment). In addition to these we provide a mechanism for supplying 'query commands'. Use of these requires some minor understanding of the workings of pregap and of bourne shell.

A 'query command' is simply another variable containing the name and arguments for a command to be evaluated when the appropriate piece of information needs to be accessed. Query commands override our existing definitions. For instance if we have both "SF" and "SF_com" variables set then we will evaluate "SF_com" and use the output of this as the pathname for the sequencing vector. No checking is performed to check that the command succeeded.

During the initial SCF and Experiment file creation the following variables can be evaluated:

abi_SCF_com
alf_SCF_com
Both of these provide the filename for the SCF file to be created. The variable for the associated file type will be used.

abi_Exp_com
alf_Exp_com
pln_Exp_com
scf_Exp_com
These provide the filename for the Experiment file to be created. As before, the variable appropriate to the input file type will be used.

abi_Ent_com
alf_Ent_com
pln_Ent_com
scf_Ent_com
Defines the reading name that will be used within gap for this filename. Typically the same as the filename. The variable of the appropriate input file type will be used.

During the evaluation of the above variables the "file" variable is set to the name of the current trace file to be processed. The system pregaprc defines sensible defaults for these. See the end of the $STADENROOT/pregap/system-pregaprc file for the standard defaults for these variables. Note that there are a few 'utility' procedures defined here too.

The Augment Experiment File stage also utilises query commands. All subsequent stages make use of the data stored in experiment files and so do not require query commands. For each Experiment File identifier there is an associated command. For instance, the "SF" variable has an "SF_com" command. The complete list of variables can be found at the end of this manual. Example usage of query commands here would be the following:

OP_com=whoami
DT_com=date
MT_com='echo $file_type'

Once again, during evaluation of commands, the "file" variable can be used to reference the name of the current Experiment file being processed. The "ID" variable is also available here to reference the "ID" (Entry Name) Experiment File field, although typically this will be the same as the "file" variable. As always during the pregrap execution, the answers to the original questions are available, such as the "file_type" variable.

In the following sections examples are given describing methods of implementing simple external databases for use with pregap. Most of the files mentioned in these sections can be found as part of the Staden Package in the `$PREGAPROOT/examples' directory.


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/pregap_7.html