Primer Scoring
Three assay score components that evaluate primer pair quality, secondary structure, and amplicon size fit.
Overview
When primer design is enabled, three additional components are activated in the assay score: primer thermodynamics (weight 0.10), primer structure (weight 0.10), and amplicon fit (weight 0.05). Together they account for 25% of the default weight budget, reflecting the importance of reliable amplification in diagnostic assays.
All three components produce scores in the [0, 1] range where higher is better. When primer design is not enabled, their weights are redistributed proportionally to the remaining active components.
Primer Thermodynamics
| Property | Value |
|---|---|
| Default weight | 0.10 |
| Active when | Primer design enabled |
| Score range | [0, 1] |
The primer thermodynamics score evaluates the overall quality of the primer pair based on Primer3's pair_penalty metric, which combines Tm optimality, GC%, and self-complementarity into a single penalty value.
The score is computed via min-max normalization across all primer pairs in the batch, then inverted (lower penalty = higher score):
score = 1.0 - (pair_penalty - min_penalty) / (max_penalty - min_penalty)
When all primers have the same penalty (zero spread), the score defaults to 1.0. This batch-relative normalization means the best primer pair in any given run always scores 1.0 and the worst scores 0.0, ensuring the component uses its full range.
Primer Structure
| Property | Value |
|---|---|
| Default weight | 0.10 |
| Active when | Primer design enabled + ntthal ΔG data available |
| Score range | [0, 1] |
The primer structure score penalizes secondary structures (hairpins, homodimers, heterodimers) that reduce effective primer concentration. It uses the worst (most negative) \u0394G across all structure types for the primer pair, computed via Primer3's ntthal FFI interface.
The penalty ramps linearly from 0.0 to 1.0 based on \u0394G magnitude:
\u0394G > -2.0 kcal/mol: penalty 0.0 (no significant structure)\u0394G < -8.0 kcal/mol: penalty 1.0 (strong secondary structure)- Between:
penalty = (|\u0394G| - 2.0) / 6.0
The final score is 1.0 - penalty, so primers with no detectable secondary structure score 1.0. When ntthal \u0394G data is not available for a primer pair, this component's weight is set to 0.0 and redistributed.
Amplicon Fit
| Property | Value |
|---|---|
| Default weight | 0.05 |
| Active when | Primer design enabled |
| Score range | [0.5, 1.0] within valid range |
The amplicon fit score expresses a mild preference for amplicon sizes close to the optimal length. It is intentionally a soft tiebreaker rather than a hard penalty — everything within the valid Primer3 range scores at least 0.5.
The score is computed as:
score = 1.0 - 0.5 \u00d7 |length - optimal| / max_distance
Where max_distance is the larger of (optimal - min) and (max - optimal). Typical values for RPA (Recombinase Polymerase Amplification) are:
| Parameter | Typical Value |
|---|---|
| Optimal amplicon | 150 bp |
| Minimum amplicon | 90 bp |
| Maximum amplicon | 300 bp |
At the optimal length the score is 1.0; at the range boundaries it is 0.5. The half-scale design ensures amplicon size never dominates the ranking — it only breaks ties between otherwise similar candidates.