Coverage & Specificity
Three assay score components for variant-aware coverage and genome-aware specificity scoring.
Overview
The coverage and specificity components evaluate how well a guide targets the intended variants while avoiding off-target matches. These components are only active when the corresponding data sources are provided to the pipeline:
| Component | Default Weight | Data Source | When Active |
|---|---|---|---|
| coverage | 0.25 | MSA alignment of target variants | Target MSA provided or run_from_msa() used |
| genome_specificity | 0.00 | Host genome index | Genome screening index provided |
| msa_specificity | 0.00 | Non-target MSA alignments | Non-target MSA data provided |
All three produce scores in the [0, 1] range where higher is better. Coverage is active by default with a significant weight (0.25), while the two specificity components default to 0.0 weight and must be explicitly activated.
Coverage
| Property | Value |
|---|---|
| Default weight | 0.25 |
| Active when | Target MSA data provided |
| Score range | [0, 1] |
| Meaning | Fraction of target variants the guide matches |
The coverage score represents the fraction of target variant sequences that the guide RNA can bind. It is derived from multiple sequence alignment (MSA) of the target's known variants. A score of 1.0 means the guide matches every variant in the alignment; a score of 0.5 means it covers half of them.
Coverage is the key differentiator when designing diagnostics against rapidly evolving targets (e.g., RNA viruses). Its default weight of 0.25 is the second highest after ML activity (0.30), reflecting the importance of broad variant detection in diagnostic sensitivity.
When no MSA data is provided (single-sequence mode), coverage is set to 0.0 and its weight is redistributed to the remaining active components.
Genome Specificity
| Property | Value |
|---|---|
| Default weight | 0.00 |
| Active when | Genome screening index provided |
| Score range | [0, 1] |
| Meaning | 1 − hit ratio (1.0 = no off-target hits = ideal) |
Genome specificity measures how unique the guide sequence is relative to a host genome. It is computed as 1.0 - hit_ratio, where the hit ratio reflects the density of off-target matches found when screening the guide against a genome index. A score of 1.0 means no off-target hits were found; lower scores indicate increasing risk of non-specific binding.
This component defaults to weight 0.00 because it requires a pre-built genome index that is not always available. To activate it, provide a genome index via the pipeline builder's with_genome_screening() method and use the with_specificity() weight preset.
MSA Specificity
| Property | Value |
|---|---|
| Default weight | 0.00 |
| Active when | Non-target MSA alignments provided |
| Score range | [0, 1] |
| Meaning | Cross-reactivity specificity (1.0 = highly specific to target) |
MSA specificity evaluates whether the guide cross-reacts with non-target organisms in a provided set of alignments. A score of 1.0 means the guide is highly specific to the intended target and does not match sequences in the non-target MSA. Lower scores indicate the guide may bind related but unintended organisms, which is critical for diagnostic specificity.
Like genome specificity, this component defaults to weight 0.00 and must be activated by providing non-target alignments via with_msa_specificity() on the pipeline builder.
Weight Rebalancing with Specificity
The with_specificity() weight preset rebalances the default weights to accommodate both specificity components:
| Component | default() | with_specificity() | Change |
|---|---|---|---|
| ml_activity | 0.30 | 0.25 | −0.05 |
| heuristic_quality | 0.10 | 0.08 | −0.02 |
| spacer_structure | 0.10 | 0.08 | −0.02 |
| primer_thermo | 0.10 | 0.10 | — |
| primer_structure | 0.10 | 0.10 | — |
| amplicon_fit | 0.05 | 0.04 | −0.01 |
| coverage | 0.25 | 0.20 | −0.05 |
| genome_specificity | 0.00 | 0.08 | +0.08 |
| msa_specificity | 0.00 | 0.07 | +0.07 |
The primer weights are kept unchanged (0.10 + 0.10) because amplification reliability is equally important in specificity-aware assays. The freed weight comes from small reductions to ML activity, heuristics, structure, amplicon fit, and coverage. Both presets sum to 1.0.
with_specificity() preset, those components will still have weight 0.0 in the default preset and will not affect rankings. You must either use the preset or set custom weights to give them non-zero influence. See Weight Presets for all available presets.