Summary
This experiment investigates pcr amplification efficiency. Full factorial of annealing temperature, primer concentration, MgCl2 concentration, and cycle count to maximize yield and minimize non-specific bands.
The design varies 4 factors: anneal temp c (C), ranging from 52 to 65, primer nm (nM), ranging from 200 to 600, mgcl2 mm (mM), ranging from 1.0 to 3.0, and cycles (cycles), ranging from 25 to 40. The goal is to optimize 2 responses: yield score (pts) (maximize) and specificity (pts) (maximize). Fixed conditions held constant across all runs include polymerase = taq, template ng = 50.
A full factorial design was used to explore all 16 possible combinations of the 4 factors at two levels. This guarantees that every main effect and interaction can be estimated independently, at the cost of a larger experiment (16 runs).
Quadratic response surface models were fitted to capture potential curvature and factor interactions. The RSM contour plots below visualize how pairs of factors jointly affect each response.
Key Findings
For yield score, the most influential factors were cycles (56.9%), mgcl2 mm (24.6%), primer nm (10.8%). The best observed value was 8.2 (at anneal temp c = 65, primer nm = 200, mgcl2 mm = 3.0).
For specificity, the most influential factors were anneal temp c (54.6%), cycles (33.2%), mgcl2 mm (7.3%). The best observed value was 9.5 (at anneal temp c = 65, primer nm = 600, mgcl2 mm = 1.0).
Recommended Next Steps
- Consider whether any fixed factors should be varied in a future study.
Experimental Setup
Factors
| Factor | Low | High | Unit |
anneal_temp_c | 52 | 65 | C |
primer_nm | 200 | 600 | nM |
mgcl2_mm | 1.0 | 3.0 | mM |
cycles | 25 | 40 | cycles |
Fixed: polymerase = taq, template_ng = 50
Responses
| Response | Direction | Unit |
yield_score | ↑ maximize | pts |
specificity | ↑ maximize | pts |
Configuration
{
"metadata": {
"name": "PCR Amplification Efficiency",
"description": "Full factorial of annealing temperature, primer concentration, MgCl2 concentration, and cycle count to maximize yield and minimize non-specific bands"
},
"factors": [
{
"name": "anneal_temp_c",
"levels": [
"52",
"65"
],
"type": "continuous",
"unit": "C"
},
{
"name": "primer_nm",
"levels": [
"200",
"600"
],
"type": "continuous",
"unit": "nM"
},
{
"name": "mgcl2_mm",
"levels": [
"1.0",
"3.0"
],
"type": "continuous",
"unit": "mM"
},
{
"name": "cycles",
"levels": [
"25",
"40"
],
"type": "continuous",
"unit": "cycles"
}
],
"fixed_factors": {
"polymerase": "taq",
"template_ng": "50"
},
"responses": [
{
"name": "yield_score",
"optimize": "maximize",
"unit": "pts"
},
{
"name": "specificity",
"optimize": "maximize",
"unit": "pts"
}
],
"settings": {
"operation": "full_factorial",
"test_script": "use_cases/190_pcr_amplification/sim.sh"
}
}
Experimental Matrix
The Full Factorial Design produces 16 runs. Each row is one experiment with specific factor settings.
| Run | anneal_temp_c | primer_nm | mgcl2_mm | cycles |
| 1 | 52 | 600 | 3.0 | 40 |
| 2 | 65 | 200 | 1.0 | 40 |
| 3 | 52 | 600 | 1.0 | 40 |
| 4 | 52 | 600 | 3.0 | 25 |
| 5 | 65 | 600 | 3.0 | 25 |
| 6 | 65 | 200 | 3.0 | 25 |
| 7 | 65 | 600 | 1.0 | 25 |
| 8 | 65 | 200 | 1.0 | 25 |
| 9 | 52 | 200 | 1.0 | 40 |
| 10 | 52 | 200 | 3.0 | 25 |
| 11 | 65 | 600 | 1.0 | 40 |
| 12 | 65 | 600 | 3.0 | 40 |
| 13 | 52 | 600 | 1.0 | 25 |
| 14 | 65 | 200 | 3.0 | 40 |
| 15 | 52 | 200 | 1.0 | 25 |
| 16 | 52 | 200 | 3.0 | 40 |
Step-by-Step Workflow
1
Preview the design
$ doe info --config use_cases/190_pcr_amplification/config.json
2
Generate the runner script
$ doe generate --config use_cases/190_pcr_amplification/config.json \
--output use_cases/190_pcr_amplification/results/run.sh --seed 42
3
Execute the experiments
$ bash use_cases/190_pcr_amplification/results/run.sh
4
Analyze results
$ doe analyze --config use_cases/190_pcr_amplification/config.json
5
Get optimization recommendations
$ doe optimize --config use_cases/190_pcr_amplification/config.json
6
Multi-objective optimization
With 2 competing responses, use --multi to find the best compromise via Derringer–Suich desirability.
$ doe optimize --config use_cases/190_pcr_amplification/config.json --multi
7
Generate the HTML report
$ doe report --config use_cases/190_pcr_amplification/config.json \
--output use_cases/190_pcr_amplification/results/report.html
Features Exercised
| Feature | Value |
| Design type | full_factorial |
| Factor types | continuous (all 4) |
| Arg style | double-dash |
| Responses | 2 (yield_score ↑, specificity ↑) |
| Total runs | 16 |
Analysis Results
Generated from actual experiment runs using the DOE Helper Tool.
Response: yield_score
Top factors: cycles (56.9%), mgcl2_mm (24.6%), primer_nm (10.8%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| Source | DF | SS | MS | F | p-value |
| anneal_temp_c | 1 | 0.0625 | 0.0625 | 0.015 | 0.9088 |
| primer_nm | 1 | 0.1225 | 0.1225 | 0.028 | 0.8726 |
| mgcl2_mm | 1 | 0.6400 | 0.6400 | 0.149 | 0.7156 |
| cycles | 1 | 3.4225 | 3.4225 | 0.795 | 0.4133 |
| anneal_temp_c*primer_nm | 1 | 1.8225 | 1.8225 | 0.424 | 0.5439 |
| anneal_temp_c*mgcl2_mm | 1 | 0.8100 | 0.8100 | 0.188 | 0.6825 |
| anneal_temp_c*cycles | 1 | 2.1025 | 2.1025 | 0.489 | 0.5157 |
| primer_nm*mgcl2_mm | 1 | 0.0000 | 0.0000 | 0.000 | 1.0000 |
| primer_nm*cycles | 1 | 0.0225 | 0.0225 | 0.005 | 0.9452 |
| mgcl2_mm*cycles | 1 | 2.5600 | 2.5600 | 0.595 | 0.4753 |
| Error | 5 | 21.5125 | 4.3025 | | |
| Total | 15 | 33.0775 | 2.2052 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response: specificity
Top factors: anneal_temp_c (54.6%), cycles (33.2%), mgcl2_mm (7.3%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| Source | DF | SS | MS | F | p-value |
| anneal_temp_c | 1 | 12.7806 | 12.7806 | 7.210 | 0.0436 |
| primer_nm | 1 | 0.1056 | 0.1056 | 0.060 | 0.8169 |
| mgcl2_mm | 1 | 0.2256 | 0.2256 | 0.127 | 0.7358 |
| cycles | 1 | 4.7306 | 4.7306 | 2.669 | 0.1633 |
| anneal_temp_c*primer_nm | 1 | 0.6006 | 0.6006 | 0.339 | 0.5858 |
| anneal_temp_c*mgcl2_mm | 1 | 0.0756 | 0.0756 | 0.043 | 0.8445 |
| anneal_temp_c*cycles | 1 | 1.6256 | 1.6256 | 0.917 | 0.3822 |
| primer_nm*mgcl2_mm | 1 | 1.7556 | 1.7556 | 0.990 | 0.3653 |
| primer_nm*cycles | 1 | 4.1006 | 4.1006 | 2.313 | 0.1888 |
| mgcl2_mm*cycles | 1 | 0.2756 | 0.2756 | 0.155 | 0.7096 |
| Error | 5 | 8.8631 | 1.7726 | | |
| Total | 15 | 35.1394 | 2.3426 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response Surface Plots
3D surfaces fitted with quadratic RSM. Red dots are observed data points.
specificity anneal temp c vs cycles
specificity anneal temp c vs mgcl2 mm
specificity anneal temp c vs primer nm
specificity mgcl2 mm vs cycles
specificity primer nm vs cycles
specificity primer nm vs mgcl2 mm
yield score anneal temp c vs cycles
yield score anneal temp c vs mgcl2 mm
yield score anneal temp c vs primer nm
yield score mgcl2 mm vs cycles
yield score primer nm vs cycles
yield score primer nm vs mgcl2 mm
Multi-Objective Optimization
When responses compete, Derringer–Suich desirability finds the best compromise.
Each response is scaled to a 0–1 desirability, then combined via a weighted geometric mean.
Overall Desirability
D = 0.7009
Per-Response Desirability
| Response | Weight | Desirability | Predicted | Dir |
yield_score |
1.5 |
|
6.80 0.7189 6.80 pts |
↑ |
specificity |
1.5 |
|
7.80 0.6834 7.80 pts |
↑ |
Recommended Settings
| Factor | Value |
anneal_temp_c | 52 C |
primer_nm | 200 nM |
mgcl2_mm | 1.0 mM |
cycles | 40 cycles |
Source: from observed run #11
Trade-off Summary
Sacrifice = how much worse than single-objective best.
| Response | Predicted | Best Observed | Sacrifice |
specificity | 7.80 | 9.50 | +1.70 |
Top 3 Runs by Desirability
| Run | D | Factor Settings |
| #12 | 0.6741 | anneal_temp_c=65, primer_nm=600, mgcl2_mm=3.0, cycles=25 |
| #2 | 0.5982 | anneal_temp_c=65, primer_nm=200, mgcl2_mm=3.0, cycles=25 |
Model Quality
| Response | R² | Type |
specificity | 0.6917 | linear |
Full Multi-Objective Output
============================================================
MULTI-OBJECTIVE OPTIMIZATION
Method: Derringer-Suich Desirability Function
============================================================
Overall desirability: D = 0.7009
Response Weight Desirability Predicted Direction
---------------------------------------------------------------------
yield_score 1.5 0.7189 6.80 pts ↑
specificity 1.5 0.6834 7.80 pts ↑
Recommended settings:
anneal_temp_c = 52 C
primer_nm = 200 nM
mgcl2_mm = 1.0 mM
cycles = 40 cycles
(from observed run #11)
Trade-off summary:
yield_score: 6.80 (best observed: 8.20, sacrifice: +1.40)
specificity: 7.80 (best observed: 9.50, sacrifice: +1.70)
Model quality:
yield_score: R² = 0.2091 (linear)
specificity: R² = 0.6917 (linear)
Top 3 observed runs by overall desirability:
1. Run #11 (D=0.7009): anneal_temp_c=52, primer_nm=200, mgcl2_mm=1.0, cycles=40
2. Run #12 (D=0.6741): anneal_temp_c=65, primer_nm=600, mgcl2_mm=3.0, cycles=25
3. Run #2 (D=0.5982): anneal_temp_c=65, primer_nm=200, mgcl2_mm=3.0, cycles=25
Full Analysis Output
=== Main Effects: yield_score ===
Factor Effect Std Error % Contribution
--------------------------------------------------------------
cycles 0.9250 0.3712 56.9%
mgcl2_mm -0.4000 0.3712 24.6%
primer_nm -0.1750 0.3712 10.8%
anneal_temp_c 0.1250 0.3712 7.7%
=== ANOVA Table: yield_score ===
Source DF SS MS F p-value
-----------------------------------------------------------------------------
anneal_temp_c 1 0.0625 0.0625 0.015 0.9088
primer_nm 1 0.1225 0.1225 0.028 0.8726
mgcl2_mm 1 0.6400 0.6400 0.149 0.7156
cycles 1 3.4225 3.4225 0.795 0.4133
anneal_temp_c*primer_nm 1 1.8225 1.8225 0.424 0.5439
anneal_temp_c*mgcl2_mm 1 0.8100 0.8100 0.188 0.6825
anneal_temp_c*cycles 1 2.1025 2.1025 0.489 0.5157
primer_nm*mgcl2_mm 1 0.0000 0.0000 0.000 1.0000
primer_nm*cycles 1 0.0225 0.0225 0.005 0.9452
mgcl2_mm*cycles 1 2.5600 2.5600 0.595 0.4753
Error 5 21.5125 4.3025
Total 15 33.0775 2.2052
=== Interaction Effects: yield_score ===
Factor A Factor B Interaction % Contribution
------------------------------------------------------------------------
mgcl2_mm cycles -0.8000 29.4%
anneal_temp_c cycles -0.7250 26.6%
anneal_temp_c primer_nm 0.6750 24.8%
anneal_temp_c mgcl2_mm 0.4500 16.5%
primer_nm cycles -0.0750 2.8%
primer_nm mgcl2_mm -0.0000 0.0%
=== Summary Statistics: yield_score ===
anneal_temp_c:
Level N Mean Std Min Max
------------------------------------------------------------
52 8 5.1500 1.2271 3.1000 6.8000
65 8 5.2750 1.7918 2.8000 8.2000
primer_nm:
Level N Mean Std Min Max
------------------------------------------------------------
200 8 5.3000 0.8586 4.1000 6.8000
600 8 5.1250 1.9927 2.8000 8.2000
mgcl2_mm:
Level N Mean Std Min Max
------------------------------------------------------------
1.0 8 5.4125 1.3400 2.8000 7.3000
3.0 8 5.0125 1.6848 3.1000 8.2000
cycles:
Level N Mean Std Min Max
------------------------------------------------------------
25 8 4.7500 1.6827 2.8000 8.2000
40 8 5.6750 1.1853 3.8000 7.3000
=== Main Effects: specificity ===
Factor Effect Std Error % Contribution
--------------------------------------------------------------
anneal_temp_c -1.7875 0.3826 54.6%
cycles -1.0875 0.3826 33.2%
mgcl2_mm 0.2375 0.3826 7.3%
primer_nm 0.1625 0.3826 5.0%
=== ANOVA Table: specificity ===
Source DF SS MS F p-value
-----------------------------------------------------------------------------
anneal_temp_c 1 12.7806 12.7806 7.210 0.0436
primer_nm 1 0.1056 0.1056 0.060 0.8169
mgcl2_mm 1 0.2256 0.2256 0.127 0.7358
cycles 1 4.7306 4.7306 2.669 0.1633
anneal_temp_c*primer_nm 1 0.6006 0.6006 0.339 0.5858
anneal_temp_c*mgcl2_mm 1 0.0756 0.0756 0.043 0.8445
anneal_temp_c*cycles 1 1.6256 1.6256 0.917 0.3822
primer_nm*mgcl2_mm 1 1.7556 1.7556 0.990 0.3653
primer_nm*cycles 1 4.1006 4.1006 2.313 0.1888
mgcl2_mm*cycles 1 0.2756 0.2756 0.155 0.7096
Error 5 8.8631 1.7726
Total 15 35.1394 2.3426
=== Interaction Effects: specificity ===
Factor A Factor B Interaction % Contribution
------------------------------------------------------------------------
primer_nm cycles -1.0125 32.7%
primer_nm mgcl2_mm 0.6625 21.4%
anneal_temp_c cycles 0.6375 20.6%
anneal_temp_c primer_nm 0.3875 12.5%
mgcl2_mm cycles 0.2625 8.5%
anneal_temp_c mgcl2_mm -0.1375 4.4%
=== Summary Statistics: specificity ===
anneal_temp_c:
Level N Mean Std Min Max
------------------------------------------------------------
52 8 7.8375 1.0954 6.2000 9.5000
65 8 6.0500 1.4122 3.8000 7.8000
primer_nm:
Level N Mean Std Min Max
------------------------------------------------------------
200 8 6.8625 1.4461 4.9000 8.7000
600 8 7.0250 1.7069 3.8000 9.5000
mgcl2_mm:
Level N Mean Std Min Max
------------------------------------------------------------
1.0 8 6.8250 1.7161 3.8000 8.7000
3.0 8 7.0625 1.4292 4.9000 9.5000
cycles:
Level N Mean Std Min Max
------------------------------------------------------------
25 8 7.4875 1.5597 5.0000 9.5000
40 8 6.4000 1.3825 3.8000 7.8000
Optimization Recommendations
=== Optimization: yield_score ===
Direction: maximize
Best observed run: #12
anneal_temp_c = 65
primer_nm = 200
mgcl2_mm = 3.0
cycles = 40
Value: 8.2
RSM Model (linear, R² = 0.2789, Adj R² = 0.0167):
Coefficients:
intercept +5.2125
anneal_temp_c +0.1125
primer_nm -0.5125
mgcl2_mm +0.2750
cycles +0.4750
RSM Model (quadratic, R² = 0.6201, Adj R² = -4.6991):
Coefficients:
intercept +1.0425
anneal_temp_c +0.1125
primer_nm -0.5125
mgcl2_mm +0.2750
cycles +0.4750
anneal_temp_c*primer_nm -0.5625
anneal_temp_c*mgcl2_mm +0.3000
anneal_temp_c*cycles +0.2500
primer_nm*mgcl2_mm -0.1500
primer_nm*cycles +0.1500
mgcl2_mm*cycles +0.4375
anneal_temp_c^2 +1.0425
primer_nm^2 +1.0425
mgcl2_mm^2 +1.0425
cycles^2 +1.0425
Curvature analysis:
primer_nm coef=+1.0425 convex (has a minimum)
mgcl2_mm coef=+1.0425 convex (has a minimum)
anneal_temp_c coef=+1.0425 convex (has a minimum)
cycles coef=+1.0425 convex (has a minimum)
Notable interactions:
anneal_temp_c*primer_nm coef=-0.5625 (antagonistic)
mgcl2_mm*cycles coef=+0.4375 (synergistic)
anneal_temp_c*mgcl2_mm coef=+0.3000 (synergistic)
Predicted optimum (from linear model, at observed points):
anneal_temp_c = 65
primer_nm = 200
mgcl2_mm = 3.0
cycles = 40
Predicted value: 6.5875
Surface optimum (via L-BFGS-B, linear model):
anneal_temp_c = 65
primer_nm = 200
mgcl2_mm = 3
cycles = 40
Predicted value: 6.5875
Model quality: Weak fit — consider adding center points or using a different design.
Factor importance:
1. primer_nm (effect: -1.0, contribution: 37.3%)
2. cycles (effect: 1.0, contribution: 34.5%)
3. mgcl2_mm (effect: 0.5, contribution: 20.0%)
4. anneal_temp_c (effect: 0.2, contribution: 8.2%)
=== Optimization: specificity ===
Direction: maximize
Best observed run: #8
anneal_temp_c = 65
primer_nm = 600
mgcl2_mm = 1.0
cycles = 40
Value: 9.5
RSM Model (linear, R² = 0.1637, Adj R² = -0.1404):
Coefficients:
intercept +6.9438
anneal_temp_c -0.2687
primer_nm +0.2188
mgcl2_mm -0.4312
cycles -0.2312
RSM Model (quadratic, R² = 0.3471, Adj R² = -8.7938):
Coefficients:
intercept +1.3888
anneal_temp_c -0.2687
primer_nm +0.2188
mgcl2_mm -0.4313
cycles -0.2313
anneal_temp_c*primer_nm +0.1812
anneal_temp_c*mgcl2_mm +0.1312
anneal_temp_c*cycles -0.2438
primer_nm*mgcl2_mm -0.2062
primer_nm*cycles -0.2063
mgcl2_mm*cycles -0.4563
anneal_temp_c^2 +1.3888
primer_nm^2 +1.3888
mgcl2_mm^2 +1.3888
cycles^2 +1.3888
Curvature analysis:
primer_nm coef=+1.3888 convex (has a minimum)
mgcl2_mm coef=+1.3888 convex (has a minimum)
cycles coef=+1.3888 convex (has a minimum)
anneal_temp_c coef=+1.3888 convex (has a minimum)
Notable interactions:
mgcl2_mm*cycles coef=-0.4563 (antagonistic)
Predicted optimum (from linear model, at observed points):
anneal_temp_c = 52
primer_nm = 600
mgcl2_mm = 1.0
cycles = 25
Predicted value: 8.0938
Surface optimum (via L-BFGS-B, linear model):
anneal_temp_c = 52
primer_nm = 600
mgcl2_mm = 1
cycles = 25
Predicted value: 8.0938
Model quality: Weak fit — consider adding center points or using a different design.
Factor importance:
1. mgcl2_mm (effect: -0.9, contribution: 37.5%)
2. anneal_temp_c (effect: -0.5, contribution: 23.4%)
3. cycles (effect: -0.5, contribution: 20.1%)
4. primer_nm (effect: 0.4, contribution: 19.0%)