first previous next last contents

Automation -- the .pregaprc file

The format of the .pregaprc file is that of bourne shell (if pregap finds the file then it simply sources it). As a quick guideline to the syntax:

A '#' character represents a comment: all text to the end of that line is ignored. To set a variable use "name=value". This will set "name" to contain the string "value". Be careful not to include any spaces either side of the equals sign. To unset a previously defined variable use "unset name".

An example of a simple utilisation of the .pregaprc files is outlined below:

[ "$ " here represents the UNIX bourne shell prompt. However the example is valid for other UNIX shells too. ]

As noted above, defining the answer to a question will prevent that question from being asked. Typically this is a very simple task. For instance, if in your current project all of your data is coming from an ABI machine, and you always wish to perform quality clipping, sequence vector clipping, but no cosmid vector clipping, and no repeat detection, then the following would remove the unnecessary questions.

    $ cat > $HOME/.pregaprc
    file_type=ABI
    do_qual_clip=y
    qual_clip_interactive=n
    screen_sv=y
    screen_cv=n
    screen_av=y
    tag_alu=n
    <control-D>
    $

It may also be true that typically you use a file of filenames called "files". However this isn't always the case and so you still wish to be questioned on this matter. A method of speeding things up would be to define a default answer to the "File of filenames to be used:" question.

    $ echo "fofn_def=files" >> $HOME/.pregaprc

For the particular batch of samples you wish to process now, you know they've all been created using M13mp18 vector of which we have a copy of in "$HOME/data/m13mp18" file. We need to provide vector_clip with the relevant information and so need to set the SF, SC and SP experiment file lines. Within our directory containing the current samples we would type:

    $ cat > .pregaprc
    SF=$HOME/data/m13mp18
    SC=6249
    SP=41
    <control-D>
    $

We would then generate a file of filenames (eg "ls Sample* > files"); startup pregap; answer the questions left (only the file of filenames now, for which we can take our default) and wait for the program to finish.

Note that due to the action of the pregaprc files simply setting bourne shell variables we could perform the same tasks as above by setting environment variables instead of creating .pregaprc files.

A template .pregaprc file can be found in the pregap directory, named "dot-pregaprc".


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_5.html