The polymerase chain reaction (PCR) is a commonly used molecular biology tool for amplifying DNA, and various techniques for PCR optimization which have been developed by molecular biologists to improve PCR performance and minimize failure.

Contamination and PCR 

The PCR method is extremely sensitive, requiring only a few DNA molecules in a single reaction for amplification across several orders of magnitude. Therefore, adequate measures to avoid contamination from any DNA present in the lab environment (bacteria, viruses, or human sources) are required. Because products from previous PCR amplifications are a common source of contamination, many molecular biology labs have implemented procedures that involve dividing the lab into separate areas. One lab area is dedicated to preparation and handling of pre-PCR reagents and the setup of the PCR reaction, and another area to post-PCR processing, such as gel electrophoresis or PCR product purification. For the setup of PCR reactions, many standard operating procedures involve using pipettes with filter tips and wearing fresh laboratory gloves, and in some cases a laminar flow cabinet with UV lamp as a work station (to destroy any extraneomultimer formation). PCR is routinely assessed against a negative control reaction that is set up identically to the experimental PCR, but without template DNA, and performed alongside the experimental PCR.

Hairpins 
Secondary structures in the DNA can result in folding or knotting of DNA template or primers, leading to decreased product yield or failure of the reaction. Hairpins, which consist of internal folds caused by base-pairing between nucleotides in inverted repeats within single-stranded DNA, are common secondary structures and may result in failed PCRs.

Typically, primer design that includes a check for potential secondary structures in the primers, or addition of DMSO or glycerol to the PCR to minimize secondary structures in the DNA template, are used in the optimization of PCRs that have a history of failure due to suspected DNA hairpins.

Polymerase errors 
Taq polymerase lacks a 3′ to 5′ exonuclease activity. Thus, Taq has no error-proof-reading activity, which consists of excision of any newly misincorporated nucleotide base from the nascent (i.e., extending) DNA strand that does not match with its opposite base in the complementary DNA strand. The lack in 3′ to 5′ proofreading of the Taq enzyme results in a high error rate (mutations per nucleotide per cycle) of approximately 1 in  bases, which affects the fidelity of the PCR, especially if errors occur early in the PCR with low amounts of starting material, causing accumulation of a large proportion of amplified DNA with incorrect sequence in the final product.

Several "high-fidelity" DNA polymerases, having engineered 3′ to 5′ exonuclease activity, have become available that permit more accurate amplification for use in PCRs for sequencing or cloning of products.  Examples of polymerases with 3′ to 5′ exonuclease activity include: KOD DNA polymerase, a recombinant form of Thermococcus kodakaraensis KOD1; Vent, which is extracted from Thermococcus litoralis;  Pfu DNA polymerase, which is extracted from Pyrococcus furiosus; Pwo, which is extracted from Pyrococcus woesii; Q5 polymerase, with 280x higher fidelity amplification compared with Taq.

Magnesium concentration
Magnesium is required as a co-factor for thermostable DNA polymerase. Taq polymerase is a magnesium-dependent enzyme and determining the optimum concentration to use is critical to the success of the PCR reaction. Some of the components of the reaction mixture such as template concentration, dNTPs and the presence of chelating agents (EDTA) or proteins can reduce the amount of free magnesium present thus reducing the activity of the enzyme. Primers which bind to incorrect template sites are stabilized in the presence of excessive magnesium concentrations and so results in decreased specificity of the reaction. Excessive magnesium concentrations also stabilize double stranded DNA and prevent complete denaturation of the DNA during PCR reducing the product yield. Inadequate thawing of MgCl2 may result in the formation of concentration gradients within the magnesium chloride solution supplied with the DNA polymerase and also contributes to many failed experiments  .

Size and other limitations 
PCR works readily with a DNA template of up to two to three thousand base pairs in length. However, above this size, product yields often decrease, as with increasing length stochastic effects such as premature termination by the polymerase begin to affect the efficiency of the PCR. It is possible to amplify larger pieces of up to 50,000 base pairs with a  slower heating cycle and special polymerases.  These are polymerases fused to a processivity-enhancing DNA-binding protein, enhancing adherence of the polymerase to the DNA.

Other valuable properties of the chimeric polymerases TopoTaq and PfuC2 include enhanced thermostability, specificity and resistance to contaminants and inhibitors. They were engineered using the unique helix-hairpin-helix (HhH) DNA binding domains of topoisomerase V from hyperthermophile Methanopyrus kandleri. Chimeric polymerases overcome many limitations of native enzymes and are used in direct PCR amplification from cell cultures and even food samples, thus by-passing laborious DNA isolation steps. A robust strand-displacement activity of the hybrid TopoTaq polymerase helps solve PCR problems that can be caused by hairpins and G-loaded double helices. Helices with a high G-C content possess a higher melting temperature, often impairing PCR, depending on the conditions.

Non-specific priming 
Non-specific binding of primers frequently occurs and may occur for several reasons. These include repeat sequences in the DNA template, non-specific binding between primer and template, high or low G-C content in the template, or incomplete primer binding, leaving the 5' end of the primer unattached to the template. Non-specific binding of degenerate primers is also common. Manipulation of annealing temperature and magnesium ion concentration may be used to increase specificity. For example, lower concentrations of magnesium or other cations may prevent non-specific primer interactions, thus enabling successful PCR. A "hot-start" polymerase enzyme whose activity is blocked unless it is heated to high temperature (e.g., 90–98˚C) during the denaturation step of the first cycle, is commonly used to prevent non-specific priming during reaction preparation at lower temperatures. Chemically mediated hot-start PCRs require higher temperatures and longer incubation times for polymerase activation, compared with antibody or aptamer-based hot-start PCRs.

Other methods to increase specificity include Nested PCR and Touchdown PCR.

Computer simulations of theoretical PCR results (Electronic PCR) may be performed to assist in primer design.

Touchdown polymerase chain reaction or touchdown style polymerase chain reaction is a method of polymerase chain reaction by which primers will avoid amplifying nonspecific sequences. The annealing temperature during a polymerase chain reaction determines the specificity of primer annealing. The melting point of the primer sets the upper limit on annealing temperature. At temperatures just below this point, only very specific base pairing between the primer and the template will occur. At lower temperatures, the primers bind less specifically. Nonspecific primer binding obscures polymerase chain reaction results, as the nonspecific sequences to which primers anneal in early steps of amplification will "swamp out" any specific sequences because of the exponential nature of polymerase amplification.

The earliest steps of a touchdown polymerase chain reaction cycle have high annealing temperatures. The annealing temperature is decreased in increments for every subsequent set of cycles (the number of individual cycles and increments of temperature decrease is chosen by the experimenter). The primer will anneal at the highest temperature which is least-permissive of nonspecific binding that it is able to tolerate. Thus, the first sequence amplified is the one between the regions of greatest primer specificity; it is most likely that this is the sequence of interest. These fragments will be further amplified during subsequent rounds at lower temperatures, and will out compete the nonspecific sequences to which the primers may bind at those lower temperatures. If the primer initially (during the higher-temperature phases) binds to the sequence of interest, subsequent rounds of polymerase chain reaction can be performed upon the product to further amplify those fragments.

Primer dimers
Annealing of the 3' end of one primer to itself or the second primer may cause primer extension, resulting in the formation of so-called primer dimers, visible as low-molecular-weight bands on PCR gels. Primer dimer formation often competes with formation of the DNA fragment of interest, and may be avoided using primers that are designed such that they lack complementarity—especially at the 3' ends—to itself or the other primer used in the reaction. If primer design is constrained by other factors and if primer-dimers do occur, methods to limit their formation may include optimisation of the MgCl2 concentration or increasing the annealing temperature in the PCR.

Deoxynucleotides
Deoxynucleotides (dNTPs) may bind Mg2+ ions and thus affect the concentration of free magnesium ions in the reaction. In addition, excessive amounts of dNTPs can increase the error rate of DNA polymerase and even inhibit the reaction. An imbalance in the proportion of the four dNTPs can result in misincorporation into the newly formed DNA strand and contribute to a decrease in the fidelity of DNA polymerase.

References 

Biochemistry methods
DNA
Molecular biology
Polymerase chain reaction