#!/usr/bin/perl -w #!/usr/local/bin/perl5 -w # ----- Installer Modifiable Variables ------------------------------------- # You may wish to modify the following variables to suit # your installation. $MAINTAINER ='your-email@your-host'; # This is the select box to which you should # add options for mispriming libraries. Modify the # %SEQ_LIBRARY variable in primer3_www_results as # well. $SELECT_SEQ_LIBRARY = "
\n"; # Documentation for this screen. $DOC_URL = "primer3_www_help.html"; # URL that will process the data from this screen. $PROCESS_INPUT_URL = 'primer3_www_results.cgi'; # If you make any substantial modifications give this code a new # version designation. $CGI_VERSION = "(primer3_www.cgi v 0.1 beta 1a)"; # 1a has the objective function weight for product # size reduced to .05. # ----- End Installer Modifiable Variables --------------------------------- $COPYRIGHT = q{ Copyright (c) 1996,1997,1998 Whitehead Institute for Biomedical Research. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Redistributions of source code must also reproduce this information in the source code itself.
  2. If the program is modified, redistributions must include a notice (in the same places as above) indicating that the redistributed program is not identical to the version distributed by Whitehead Institute.
  3. All advertising materials mentioning features or use of this software must display the following acknowledgment:
    This product includes software developed by the Whitehead Institute for Biomedical Research.
  4. The name of the Whitehead Institute may not be used to endorse or promote products derived from this software without specific prior written permission.
We also request that use of this software be cited in publications as
Steve Rozen, Helen J. Skaletsky (1998) Primer3. Code available at http://www-genome.wi.mit.edu/genome_software/other/primer3.html.
THIS SOFTWARE IS PROVIDED BY THE WHITEHEAD INSTITUTE ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE WHITEHEAD INSTITUTE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. }; BEGIN{ print "Content-type: text/html\n\n"; # Ensure that errors go to the web browser. open(STDERR, ">&STDOUT"); $| = 1; print ''; } use Carp; use CGI; # The CGI module is available from # http://www.genome.wi.mit.edu/ftp/distribution/software/WWW/ main(); sub main { $LIGHT_COLOR="#CCCCFF"; $C_ROW = ""; $OLIGO_INPUT_SIZE=30; $SOURCE_SEQUENCE_WIDTH = 3 * ($OLIGO_INPUT_SIZE + 1) + 2; $SMALL_TEXT=9; $VSMALL_TEXT=4; $PR_DEFAULT_PRODUCT_MIN_SIZE = 100; $PR_DEFAULT_PRODUCT_OPT_SIZE = 200; $PR_DEFAULT_PRODUCT_MAX_SIZE = 1000; $PRIMER_SEQUENCE_ID = ""; $SEQUENCE = ""; $INCLUDED_REGION = ""; $TARGET = ""; $EXCLUDED_REGION = ""; $PRIMER_SEQUENCE_QUALITY = ""; $PRIMER_LEFT_INPUT = ""; $PRIMER_RIGHT_INPUT = ""; $PRIMER_MAX_MISPRIMING = "12.00"; $PRIMER_PAIR_MAX_MISPRIMING = "24.00"; $PRIMER_GC_CLAMP = "0"; $PRIMER_OPT_SIZE = "20"; $PRIMER_MIN_SIZE = "18"; $PRIMER_MAX_SIZE = "27"; $PRIMER_OPT_TM = "60.0"; $PRIMER_MIN_TM = "57.0"; $PRIMER_MAX_TM = "63.0"; $PRIMER_MAX_DIFF_TM = "100.0"; $PRIMER_MIN_GC = "20.0"; $PRIMER_OPT_GC_PERCENT = ""; $PRIMER_MAX_GC = "80.0"; $PRIMER_SALT_CONC = "50.0"; $PRIMER_DNA_CONC = "50.0"; $PRIMER_NUM_NS_ACCEPTED = "0"; $PRIMER_SELF_ANY = "8.00"; $PRIMER_SELF_END = "3.00"; $PRIMER_MAX_POLY_X = "5"; $PRIMER_NUM_RETURN = "5"; $PRIMER_FIRST_BASE_INDEX = "1"; $PRIMER_MIN_QUALITY = "0"; $PRIMER_MIN_END_QUALITY = "0"; $PRIMER_QUALITY_RANGE_MIN = "0"; $PRIMER_QUALITY_RANGE_MAX = "100"; $PRIMER_INSIDE_PENALTY = ""; $PRIMER_OUTSIDE_PENALTY = "0"; $PR_DEFAULT_MAX_END_STABILITY = "9.0"; $PRIMER_INTERNAL_OLIGO_EXCLUDED_REGION = ""; $PRIMER_INTERNAL_OLIGO_INPUT = ""; $PRIMER_INTERNAL_OLIGO_OPT_SIZE = "20"; $PRIMER_INTERNAL_OLIGO_MIN_SIZE = "18"; $PRIMER_INTERNAL_OLIGO_MAX_SIZE = "27"; $PRIMER_INTERNAL_OLIGO_OPT_TM = "60.0"; $PRIMER_INTERNAL_OLIGO_MIN_TM = "57.0"; $PRIMER_INTERNAL_OLIGO_MAX_TM = "63.0"; $PRIMER_INTERNAL_OLIGO_MIN_GC = "20.0"; $PRIMER_INTERNAL_OLIGO_OPT_GC_PERCENT = ""; $PRIMER_INTERNAL_OLIGO_MAX_GC = "80.0"; $PRIMER_INTERNAL_OLIGO_SALT_CONC = "50.0"; $PRIMER_INTERNAL_OLIGO_DNA_CONC = "50.0"; $PRIMER_INTERNAL_OLIGO_SELF_ANY = "12.00"; $PRIMER_INTERNAL_OLIGO_MAX_POLY_X = "5"; $PRIMER_INTERNAL_OLIGO_SELF_END = "12.00"; $PRIMER_INTERNAL_OLIGO_MAX_MISHYB = "12.00"; $PRIMER_INTERNAL_OLIGO_MIN_QUALITY = "0"; $PRIMER_INTERNAL_OLIGO_NUM_NS = "0"; # $PRIMER_PRODUCT_MIN_TM = "-1000000.0"; # $PRIMER_PRODUCT_OPT_TM = "0.0"; # $PRIMER_PRODUCT_MAX_TM = "1000000.0"; $PRIMER_WT_TM_GT = "1.0"; $PRIMER_WT_TM_LT = "1.0"; $PRIMER_WT_SIZE_LT = "1.0"; $PRIMER_WT_SIZE_GT = "1.0"; $PRIMER_WT_GC_PERCENT_LT = "0.0"; $PRIMER_WT_GC_PERCENT_GT = "0.0"; $PRIMER_WT_COMPL_ANY = "0.0"; $PRIMER_WT_COMPL_END = "0.0"; $PRIMER_WT_NUM_NS = "0.0"; $PRIMER_WT_REP_SIM = "0.0"; $PRIMER_WT_SEQ_QUAL = "0.0"; $PRIMER_WT_END_QUAL = "0.0"; $PRIMER_WT_POS_PENALTY = "0.0"; $PRIMER_WT_END_STABILITY = "0.0"; $PRIMER_IO_WT_TM_GT = "1.0"; $PRIMER_IO_WT_TM_LT = "1.0"; $PRIMER_IO_WT_SIZE_LT = "1.0"; $PRIMER_IO_WT_SIZE_GT = "1.0"; $PRIMER_IO_WT_GC_PERCENT_LT = "0.0"; $PRIMER_IO_WT_GC_PERCENT_GT = "0.0"; $PRIMER_IO_WT_COMPL_ANY = "0.0"; $PRIMER_IO_WT_NUM_NS = "0.0"; $PRIMER_IO_WT_REP_SIM = "0.0"; $PRIMER_IO_WT_SEQ_QUAL = "0.0"; $PRIMER_PAIR_WT_PR_PENALTY = "1.0"; $PRIMER_PAIR_WT_IO_PENALTY = "0.0"; $PRIMER_PAIR_WT_DIFF_TM = "0.0"; $PRIMER_PAIR_WT_COMPL_ANY = "0.0"; $PRIMER_PAIR_WT_COMPL_END = "0.0"; $PRIMER_PAIR_WT_PRODUCT_TM_LT = "0.0"; $PRIMER_PAIR_WT_PRODUCT_TM_GT = "0.0"; $PRIMER_PAIR_WT_PRODUCT_SIZE_GT = "0.05"; $PRIMER_PAIR_WT_PRODUCT_SIZE_LT = "0.05"; $PRIMER_PAIR_WT_REP_SIM = "0.0"; $query = new CGI; input_screen($query); } sub input_screen { my ($query) = @_; print $query->start_html("Primer3 Input $CGI_VERSION"); my $input_buttons = qq{
}; print qq{
$C_ROW
Primer3 Test Pre-Release
pick primers from a DNA sequence
disclaimer
bugs? suggestions? source code $C_ROW cautions
Paste source sequence below (5'->3', string of ACGTNacgtn -- other letters treated as N -- numbers and blanks ignored). FASTA format ok. Please N-out undesirable sequence (vector, ALUs, LINEs, etc.) or use a Mispriming Library (repeat library): }; print $SELECT_SEQ_LIBRARY; print qq{ $C_ROW
Pick left primer or use left primer below. Pick hybridization probe (internal oligo) or use oligo below. Pick right primer or use right primer below (5'->3' on opposite strand).
$input_buttons
Sequence Id: A string to identify your output.
Targets: E.g. 50,2 requires primers to surround the 2 bases at positions 50 and 51. Or mark the source sequence with [ and ]: e.g. ...ATCT[CCCC]TCAT.. means that primers must flank the central CCCC.
Excluded Regions: E.g. 401,7 68,3 forbids selection of primers in the 7 bases starting at 401 and the 3 bases at 68. Or mark the source sequence with < and >: e.g. ...ATCT<CCCC>TCAT.. forbids primers in the central CCCC.
Product Size Min: Opt: Max:
Number To Return: Max 3\' Stability:
Max Mispriming: Pair Max Mispriming:
$input_buttons

General Primer Picking Conditions

Primer Size Min: Opt: Max:
Primer Tm Min: Opt: Max: Max Tm Difference:
Product Tm Min: Opt: Max:
Primer GC% Min: Opt: Max:
Max Self Complementarity: Max 3\' Self Complementarity:
Max \#N\'s: Max Poly-X:
Inside Target Penalty: Outside Target Penalty: Set Inside Target Penalty to allow primers inside a target.
First Base Index: CG Clamp:
Salt Concentration: Annealing Oligo Concentration: (Not the concentration of oligos in the reaction mix but of those annealing to template.)
Liberal Base Show Debuging Info
$input_buttons

Other Per-Sequence Inputs

Included Region: E.g. 20,400: only pick primers in the 400 base region starting at position 20. Or use { and } in the source sequence to mark the beginning and end of the included region: e.g. in ATC{TTC...TCT}AT the included region is TTC...TCT.
Start Codon Position:
}; print_seq_quality_input(); print qq{

Objective Function Penalty Weights for Primers

}; obj_fn_weight_lt_gt('WT_TM', $PRIMER_WT_TM_LT, $PRIMER_WT_TM_GT, 'Tm'); obj_fn_weight_lt_gt('WT_SIZE', $PRIMER_WT_SIZE_LT, $PRIMER_WT_SIZE_GT, 'Size'); obj_fn_weight_lt_gt('WT_GC_PERCENT', $PRIMER_WT_GC_PERCENT_LT, $PRIMER_WT_GC_PERCENT_GT, 'GC%'); print "
\n\n"; obj_fn_weight('WT_COMPL_ANY', $PRIMER_WT_COMPL_ANY, 'Self Complementarity'); obj_fn_weight('WT_COMPL_END', $PRIMER_WT_COMPL_END, '3\' Self Complementarity'); obj_fn_weight('WT_NUM_NS', $PRIMER_WT_NUM_NS, '#N\'s'); obj_fn_weight('WT_REP_SIM', $PRIMER_WT_REP_SIM, 'Mispriming'); obj_fn_weight('WT_SEQ_QUAL', $PRIMER_WT_SEQ_QUAL, 'Sequence Quality'); obj_fn_weight('WT_END_QUAL', $PRIMER_WT_END_QUAL, 'End Sequence Quality'); obj_fn_weight('WT_POS_PENALTY', $PRIMER_WT_POS_PENALTY, 'Position Penalty'); obj_fn_weight('WT_END_STABILITY',$PRIMER_WT_END_STABILITY, 'End Stability'); print qq{

Objective Function Penalty Weights for Primer Pairs

}; obj_fn_weight_lt_gt('PAIR_WT_PRODUCT_SIZE', $PRIMER_PAIR_WT_PRODUCT_SIZE_LT, $PRIMER_PAIR_WT_PRODUCT_SIZE_GT, 'Product Size'); obj_fn_weight_lt_gt('PAIR_WT_PRODUCT_TM', $PRIMER_PAIR_WT_PRODUCT_TM_LT, $PRIMER_PAIR_WT_PRODUCT_TM_GT, 'Product Tm'); print "
\n\n\n"; obj_fn_weight('PAIR_WT_DIFF_TM', $PRIMER_PAIR_WT_DIFF_TM, 'Tm Difference'); obj_fn_weight('PAIR_WT_COMPL_ANY', $PRIMER_PAIR_WT_COMPL_ANY, 'Any Complementarity'); obj_fn_weight('PAIR_WT_COMPL_END', $PRIMER_PAIR_WT_COMPL_END, '3\' Complementarity'); obj_fn_weight('PAIR_WT_REP_SIM', $PRIMER_PAIR_WT_REP_SIM, 'Pair Mispriming'); obj_fn_weight('PAIR_WT_PR_PENALTY',$PRIMER_PAIR_WT_PR_PENALTY, 'Primer Penalty Weight'); obj_fn_weight('PAIR_WT_IO_PENALTY',$PRIMER_PAIR_WT_IO_PENALTY, 'Hyb Oligo Penalty Weight'); print "
\n\n"; print qq{ $input_buttons

Hyb Oligo (Internal Oligo) Per-Sequence Inputs

Hyb Oligo Excluded Region:

Hyb Oligo (Internal Oligo) General Conditions

Hyb Oligo Size: Min Opt Max
Hyb Oligo Tm: Min Opt Max
Hyb Oligo GC% Min: Opt: Max:
Hyb Oligo Self Complementarity: Hyb Oligo Max 3\' Self Complementarity:
Max #Ns: Hyb Oligo Max Poly-X:
Hyb Oligo Mishyb Library: Hyb Oligo Max Mishyb:
Hyb Oligo Min Sequence Quality:
Hyb Oligo Salt Concentration: Hyb Oligo DNA Concentration:
$input_buttons

Objective Function Penalty Weights for Hyb Oligos (Internal Oligos)

}; obj_fn_weight_lt_gt('IO_WT_TM', $PRIMER_IO_WT_TM_LT, $PRIMER_IO_WT_TM_GT, 'Hyb Oligo Tm'); obj_fn_weight_lt_gt('IO_WT_SIZE', $PRIMER_IO_WT_SIZE_LT, $PRIMER_IO_WT_SIZE_GT, 'Hyb Oligo Size'); obj_fn_weight_lt_gt('IO_WT_GC_PERCENT', $PRIMER_IO_WT_GC_PERCENT_LT, $PRIMER_IO_WT_GC_PERCENT_GT, 'Hyb Oligo GC%'); print "
\n\n\n"; obj_fn_weight('IO_WT_COMPL_ANY', $PRIMER_IO_WT_COMPL_ANY, 'Hyb Oligo Self Complementarity'); obj_fn_weight('IO_WT_NUM_NS', $PRIMER_IO_WT_NUM_NS, 'Hyb Oligo #N\'s'); obj_fn_weight('IO_WT_REP_SIM', $PRIMER_IO_WT_REP_SIM, 'Hyb Oligo Mishybing'); obj_fn_weight('IO_WT_SEQ_QUAL', $PRIMER_IO_WT_SEQ_QUAL, 'Hyb Oligo Sequence Quality'); print qq{
$input_buttons

Copyright Notice and Disclaimer

$COPYRIGHT

Acknowledgments

The development of Primer3 and the Primer3 web site was funded by Howard Hughes Medical Institute and by the National Institutes of Health, National Human Genome Research Institute. under grants R01-HG00257 (to David C. Page) and P50-HG00098 (to Eric S. Lander).

We gratefully acknowledge the support of Digital Equipment Corporation, which provided the Alphas which were used for much of the development of Primer3, and of Centerline Software, Inc., whose TestCenter memory-error, -leak, and test-coverage checker we use regularly to discover and correct otherwise latent errors in Primer3.


Original design of this primer-picking web site by Richard Resnick, who also is an author of this site\'s documentation. Primer3\'s design is heavily based on earlier implementations of similar programs: Primer 0.5 (Steve Lincoln, Mark Daly, and Eric S. Lander) and Primer v2 (Richard Resnick). Lincoln Stein championed the use of the Boulder-IO format and the idea of making the Primer3 engine a software component.

Web software provided by Steve Rozen steve\@genome.wi.mit.edu and Whitehead Institute/MIT Center for Genome Research.


This page is maintained by $MAINTAINER.
$CGI_VERSION
}; print $query->end_html; print "\n"; } sub obj_fn_weight_lt_gt { my ($pretag, $def_lt, $def_gt, $row_head, $more) = @_; # $row_head print qq{ $row_head Lt: Gt: }; print " $more\n" if $more; } sub obj_fn_weight { my ($tag, $def, $row_head, $more) = @_; # $row_head print qq{ $row_head }; print " $more\n" if $more; } sub print_seq_quality_input { print qq{

Sequence Quality

Min Sequence Quality: Min End Sequence Quality: Sequence Quality Range Min: Sequence Quality Range Max:
}; }