SPACER
FinderSequencesJobsDocsContact

Search documentation

Search all SPACER documentation pages

GitHub
IntroductionQuick Start
OverviewEnzyme FamiliesPAM SequencesNomenclature
Cas12 FinderCas13 FinderMSA Guide DesignBADGERS OptimizerOptimizer Configuration
Assay ScoreHeuristic QualityML ActivitySpacer StructurePrimer ScoringCoverage & SpecificityTier SystemFlags Reference
spacer-webv0.1.0
Scoring & Quality›Primer Scoring

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

PropertyValue
Default weight0.10
Active whenPrimer 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

PropertyValue
Default weight0.10
Active whenPrimer 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

PropertyValue
Default weight0.05
Active whenPrimer 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:

ParameterTypical Value
Optimal amplicon150 bp
Minimum amplicon90 bp
Maximum amplicon300 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.

Info
When primer design is disabled, all three primer components (thermodynamics, structure, amplicon fit) have their weights set to 0.0. The total weight of 0.25 is redistributed proportionally among the remaining active components. See Inactive Components for details on weight redistribution.
Scoring & Quality
Spacer Structure
Scoring & Quality
Coverage & Specificity
ATCG GCTA TACG CGAT ATCG TAGC GCTA ATCG TACG CGAT ATCG GCTA TACG CGAT ATCG TAGC GCTA ATCG TACG CGAT ATCG GCTA TACG CGAT ATCG TAGC GCTA ATCG TACG CGAT ATCG GCTA TACG CGAT ATCG TAGC GCTA ATCG TACG CGAT ATCG GCTA TACG CGAT ATCG TAGC GCTA ATCG TACG CGAT ATCG GCTA TACG CGAT ATCG TAGC GCTA ATCG TACG CGAT ATCG GCTA TACG CGAT ATCG TAGC GCTA ATCG TACG CGAT ATCG GCTA TACG CGAT ATCG TAGC GCTA ATCG TACG CGAT
SPACER

Open-source CRISPR guide RNA design and scoring for Cas12 and Cas13 diagnostic systems.

Resources
FinderDocumentationChangelogContactGitHub
Developed atFiocruz Parana — Instituto Carlos Chagas

Fundacao Oswaldo Cruz - Parana

Instituto Carlos Chagas

© 2026 SPACER·v0.1.0
hwalflorGitHub