Example 1:  Custom Primer Design

 

Because the exact path of where all the files are will depend on where you installed the JCVI primer design software, let us use a placeholder/variable for the directory of your installation for the sake of convenience.  So for example, if you installed primer designer in “/usr/local/primer_design”, then the placeholder ${INSTALL_DIR}, should be replaced with “/usr/local”.  In other words, if we refer to:

 

${INSTALL_DIR}/primer_design/examples

 

You should actually be looking in the directory:

 

                /usr/local/primer_design/examples

 

 

Let us begin.  In this example, let us assume you have created a consensus sequence of a small genome (eg. a viral genome) and you require a set of degenerate primer pairs to cover the entire length of the genome.  We have provided you an example viral (HPIV3) consensus sequence at:

 

${INSTALL_DIR}/primer_design/examples/hpiv3/reference/HPIV3_consensus.fasta

 

To confirm you have the input FASTA file in the right place, try do find the file by performing the following command:

 

                ls ${INSTALL_DIR}/primer_design/examples/hpiv3/reference/HPIV3_consensus.fasta

 

If the file exists, then please continue to step 1.  If not, confirm that you have had a successful installation.

 

STEP 1: Setup a Custom Primer Design Run

 

The purpose of this step is to inform the primer designer where your reference sequence is, where you want the output to go, and the maximum number of degenerate bases you would like per primer.

If the ${INSTALL_DIR}/primer_design is not in your PATH environmental variable, then you will need to explicitly specify the entire path for the commands necessary for the next several steps.  Remember that in UNIX, all commands need to be place on the same line unless the backslash (\) is placed before line breaks.

 

${INSTALL_DIR}/primer_design/Start_Custom_Primer_Design.pl -d ${INSTALL_DIR}/primer_design/examples/hpiv3 -p trial1 -r ${INSTALL_DIR}/primer_design/examples/hpiv3/reference/ -n 3 -u

 

In this command, the –d parameter refers to where to create all the files for primer design.  The directory should already be created.  The –p parameter tells primer design to create a new primer design run with the specified name.  The –r refers to a directory where to look inside for a reference sequence.  In this case, we have provided you a consensus sequence already and placed it in the reference directory.  The –n refers to the maximum number of degenerate bases to allow per primer.  The –u tells primer design to not assign UIDs to each designed primers. 

 

When you run the command, you will see a flurry of commands/actions being reported to the screen.  The script will pause, and you will be asked if you want to modify the configuration file for primer pairs designed for the “strict” primer pairs and then ask you if you want to launch the jobs on your local computer.  Then the script will ask whether you want to modify the configuration file for the “HighGC” primer pairs and prompt you for permission to launch locally or on a compute grid.  In both cases, the default configuration will suffice, and so you should just accept them by answering “Y” and then hitting the return button.  When prompted for where to execute, go ahead and launch the jobs locally.

 

The following is an example of when the setup script prompts you to modify the configuration file:

 

Please modify the following configuration file, if necessary.

${INSTALL_DIR}/primer_design/examples/hpiv3/trial1/primer_design/20101118/strict/global_strict.config

 

When finished, enter 'Y' to continue or 'N' to halt processing

 

The following is an example of when the setup script prompt you to submit the jobs locally:

 

                Submitting strict jobs locally.  Enter 'Y' to continue or 'N' to halt processing

 

When you have answered “Y” to all 4 prompts, the jobs will start running locally.

 

STEP 2: Monitor your Run

 

Sometimes it may take a while to design primers, so it is useful to monitor your run.  To monitor your run, use the following command:

 

     ${INSTALL_DIR}/primer_design/Monitor_Primer_Design_Run.pl -d ${INSTALL_DIR}/primer_design/examples/hpiv3/ -p trial1 -t 20101118 -r

 

The –d and –p option should refer to the same path and run name you specified in step 1.  The –t should be the date stamp corresponding to when you launched the run.  So for example, in the above example, 20101118, refers to November 18, 2010.  The –r option tells the monitor script to no prompt to launch failed jobs.

 

An example of the output from monitoring the run could be:

 

Job: strict HPIV3_consensus/00 running.

Job: strict HPIV3_consensus/01 completed.

Job: strict HPIV3_consensus/02 running.

Job: strict HPIV3_consensus/03 completed.

Job: strict HPIV3_consensus/04 not started.

Job: strict HPIV3_consensus/05 running.

Job: strict HPIV3_consensus/06 not started.

Job: strict HPIV3_consensus/07 running.

Job: strict HPIV3_consensus/08 not started.

Job: strict HPIV3_consensus/09 not started.

 

When all the jobs have been completed you should see the following:

 

Job: strict HPIV3_consensus/00 completed.

Job: strict HPIV3_consensus/01 completed.

Job: strict HPIV3_consensus/02 completed.

Job: strict HPIV3_consensus/03 completed.

Job: strict HPIV3_consensus/04 completed.

Job: strict HPIV3_consensus/05 completed.

Job: strict HPIV3_consensus/06 completed.

Job: strict HPIV3_consensus/07 completed.

Job: strict HPIV3_consensus/08 completed.

Job: strict HPIV3_consensus/09 completed.

 

SUCCESS!!  All primer design jobs are complete.

Please run the Aggregate_Primer_Design_Results.pl script to generate the results and reports files.

 

 

STEP 3: Aggregate your Run

 

When all jobs have completed you will want to aggregate all the separated computes into a single result.  Execute the following command:

 

${INSTALL_DIR}/primer_design/Aggregate_Primer_Design_Results.pl -d ${INSTALL_DIR}/primer_design/examples/hpiv3/ -p trial1 -t 20101118 -g

 

The -d, -p and -t are the same as in step 2.  The -g option should be specified to avoid assigning UIDs to the design amplicons.

 

After the script has completed, you can find the aggregated results in:

 

${INSTALL_DIR}/primer_design/examples/hpiv3/trial1/reports

 

You can see the results in the *critique_report.csv , .pdf, and.ps files.  Please see the PCR_Primer_Design-README.doc in ${INSTALL_DIR}/primer_design for additional documentation.

 

Done.