Assay Score
A 9-component weighted composite score for ranking complete CRISPR diagnostic assay designs.
Overview
The assay score is SPACER's primary ranking metric. It combines ML activity prediction, sequence heuristics, RNA structure analysis, primer thermodynamics, amplicon fit, variant coverage, and specificity into a single normalized score on a 0.0–1.0 scale (higher is better).
Each of the 9 components is independently normalized to the [0, 1] range, then multiplied by its weight. The final score is the sum of all weighted components, re-normalized so that only active components contribute. This ensures the score always uses the full range regardless of which pipeline stages are enabled.
Score Interpretation
| Range | Tier | Interpretation |
|---|---|---|
| > 0.8 | Excellent | Strong assay candidate across all active components |
| 0.6 – 0.8 | Good | Solid candidate, may have minor trade-offs in one area |
| 0.4 – 0.6 | Acceptable | Review individual component scores for weak spots |
| < 0.4 | Poor | Likely has significant issues in one or more components |
Components
All 9 components follow the "higher is better" convention. Components that were not computed (e.g., no primer design, no genome index) are set to 0.0 and their weights are redistributed to active components.
| Component | Default Weight | Description | When Active |
|---|---|---|---|
| ml_activity | 0.30 | ML-predicted on-target activity, normalized via ml_activity_range | ML predictor enabled (EasyDesign or ADAPT) |
| heuristic_quality | 0.10 | GC content + homopolymer + PFS preference (enzyme-specific weighting) | Always active |
| spacer_structure | 0.10 | RNA structure freedom: 1.0 − MFE penalty, blended with seed accessibility | Structure predictor enabled |
| primer_thermo | 0.10 | Primer thermodynamic quality: inverted pair penalty, min-max normalized across batch | Primer design enabled |
| primer_structure | 0.10 | Primer secondary structure freedom: 1.0 − worst ΔG penalty (hairpin/dimer) | Primer design enabled + ntthal ΔG data available |
| amplicon_fit | 0.05 | Proximity to optimal amplicon size (1.0 at optimal, ≥0.5 within valid range) | Primer design enabled |
| coverage | 0.25 | Fraction of target variants the guide hits (from MSA alignment) | MSA target data provided |
| genome_specificity | 0.00 | 1 − hit ratio against host genome index | Genome screening index provided |
| msa_specificity | 0.00 | Cross-reactivity specificity against non-target MSA | Non-target MSA alignments provided |
Weight Presets
SPACER provides three built-in weight presets. All presets sum to 1.0.
default()
The standard preset for CRISPR diagnostic assay design. Balances ML activity (0.30) and variant coverage (0.25) as the strongest signals, with moderate weight on primers, structure, and heuristics. Specificity components are zeroed by default and must be activated explicitly.
| ml_activity | heuristic | structure | primer_thermo | primer_struct | amplicon | coverage | genome_spec | msa_spec |
|---|---|---|---|---|---|---|---|---|
| 0.30 | 0.10 | 0.10 | 0.10 | 0.10 | 0.05 | 0.25 | 0.00 | 0.00 |
with_specificity()
Rebalances weights to accommodate genome and MSA specificity. Use this preset when you have a host genome index and/or non-target alignments and want off-target risk factored into ranking.
| ml_activity | heuristic | structure | primer_thermo | primer_struct | amplicon | coverage | genome_spec | msa_spec |
|---|---|---|---|---|---|---|---|---|
| 0.25 | 0.08 | 0.08 | 0.10 | 0.10 | 0.04 | 0.20 | 0.08 | 0.07 |
for_optimizer()
Tuned for BADGERS optimizer spacers. The optimizer's fitness already incorporates ML predictions across all target variants, so ml_activity gets higher weight (0.35) while heuristic_quality is reduced (0.05) since the optimizer implicitly penalizes poor-quality sequences. Uses a narrower ml_activity_range of (2.0, 4.0) because optimizer fitness values cluster in that band.
| ml_activity | heuristic | structure | primer_thermo | primer_struct | amplicon | coverage | genome_spec | msa_spec |
|---|---|---|---|---|---|---|---|---|
| 0.35 | 0.05 | 0.10 | 0.10 | 0.10 | 0.05 | 0.25 | 0.00 | 0.00 |
Inactive Components & Weight Redistribution
When a component is absent (its data source was not provided), its weight is set to 0.0. The remaining active weights are then scaled proportionally so they sum to 1.0:
effective_weight = original_weight / sum(active_weights)
For example, with only ml_activity (0.30) and heuristic_quality (0.10) active, the effective weights become 0.75 and 0.25 respectively. This ensures guides are always scored on a full 0–1 scale regardless of pipeline configuration.
ML Activity Penalty
After the weighted sum, a multiplicative penalty is applied when the ML model predicts near-zero activity. A guide the model predicts won't cleave is experimentally useless regardless of primer, coverage, or structure quality.
- Raw activity
≥ 0.5: no penalty applied - Raw activity
0.0: score multiplied by0.25(75% reduction) - Linear ramp between these thresholds
- No penalty when ML prediction is absent