Skill Tracer
Skills › Scientific Agent Skills › primer-design › specificity.md

specificity.md

181 lines · skills/primer-design/references/specificity.md at 5f2bc03

Open on GitHub
1# Reference specificity and amplicon geometry
2
3Documentation checked: 2026-10-01. Specificity is a claim about named sequences,
4search settings, and assay conditions. A favorable thermodynamic score or a clean
5search of an incomplete reference does not establish a unique biological product.
6

Reference specificity and amplicon geometry

Documentation checked: 2026-10-01. Specificity is a claim about named sequences, search settings, and assay conditions. A favorable thermodynamic score or a clean search of an incomplete reference does not establish a unique biological product.

Raw lines 1 to 6
7## Select the reference universe
8
9Create a manifest before screening. Include reference source, accession/version or
10assembly release, annotation release if relevant, date retrieved, checksums, record
11IDs, lengths, topology, and which intended/expected background molecules it covers.
13| Assay | References to consider |
14| --- | --- |
15| Genomic locus | Appropriate assembly; alternate/unplaced sequences and relevant haplotypes when required |
16| Transcript assay | Intended and excluded isoforms; related genes/pseudogenes; genomic DNA as a separate check |
17| Plasmid or cloning | Complete construct, parental vector, inserts, and plausible host background |
18| Family-wide detection | Explicit intended sequence collection and near-neighbor negatives |
19| Mixed sample | Target plus likely host and other background relevant to interpretation |
21Document omitted components. Do not silently reduce a reference to the design
22window to make screening faster. Preserve distinct sequence identifiers; duplicated
23records and multiple genomic loci are different issues. Several loci with the same
24amplicon sequence remain several loci.

Select the reference universe

Create a manifest before screening. Include reference source, accession/version or assembly release, annotation release if relevant, date retrieved, checksums, record IDs, lengths, topology, and which intended/expected background molecules it covers.

AssayReferences to consider
Genomic locusAppropriate assembly; alternate/unplaced sequences and relevant haplotypes when required
Transcript assayIntended and excluded isoforms; related genes/pseudogenes; genomic DNA as a separate check
Plasmid or cloningComplete construct, parental vector, inserts, and plausible host background
Family-wide detectionExplicit intended sequence collection and near-neighbor negatives
Mixed sampleTarget plus likely host and other background relevant to interpretation

Document omitted components. Do not silently reduce a reference to the design window to make screening faster. Preserve distinct sequence identifiers; duplicated records and multiple genomic loci are different issues. Several loci with the same amplicon sequence remain several loci.

Raw lines 7 to 25
26## What the bundled local methods establish
28`screen_specificity.py` supports two local search strategies. Their guarantees are
29different; retain the method and all settings in the report.
31- **Exhaustive ungapped search:** evaluate complete primer-length windows on both
32 strands under the configured total and 3′ mismatch rules. Completeness is only
33 for the supplied reference, implemented geometry, and bounded mismatch model.
34 Insertions/deletions, longer permissible products, absent haplotypes, and unknown
35 bases cannot be dismissed from biological consideration.
36- **BLAST discovery with full-length verification:** use short-query alignment to
37 locate candidate binding windows, then verify the full primer sequence at those
38 windows. This avoids treating a short favorable local alignment as a complete
39 primer match. BLAST remains a heuristic: realignment cannot recover sites that
40 discovery never returned.
42Inspect the script's current options and emitted limitations for size, hit, and
43product caps and for supported topology. A cap reached during screening means the
44analysis is incomplete. Missing expected amplification, unsupported input, or
45truncated enumeration is not a specificity pass.
47The exhaustive method is useful for constructs and bounded references. For large
48genomes, use scalable search or Primer-BLAST, retain limitations, and avoid treating
49the Python scanner as a whole-genome performance guarantee.

What the bundled local methods establish

screen_specificity.py supports two local search strategies. Their guarantees are different; retain the method and all settings in the report.

  • Exhaustive ungapped search: evaluate complete primer-length windows on both strands under the configured total and 3′ mismatch rules. Completeness is only for the supplied reference, implemented geometry, and bounded mismatch model. Insertions/deletions, longer permissible products, absent haplotypes, and unknown bases cannot be dismissed from biological consideration.
  • BLAST discovery with full-length verification: use short-query alignment to locate candidate binding windows, then verify the full primer sequence at those windows. This avoids treating a short favorable local alignment as a complete primer match. BLAST remains a heuristic: realignment cannot recover sites that discovery never returned.

Inspect the script's current options and emitted limitations for size, hit, and product caps and for supported topology. A cap reached during screening means the analysis is incomplete. Missing expected amplification, unsupported input, or truncated enumeration is not a specificity pass.

The exhaustive method is useful for constructs and bounded references. For large genomes, use scalable search or Primer-BLAST, retain limitations, and avoid treating the Python scanner as a whole-genome performance guarantee.

Raw lines 26 to 50
51## Binding orientation and coordinates
53Store oligos in **synthesized 5′→3′ orientation**. Relative to the supplied reference:
55- A primer equal to the plus-strand window has a plus-direction binding hit and
56 extends toward increasing reference coordinates.
57- A primer equal to the reverse complement of that window has a minus-direction
58 hit and extends toward decreasing reference coordinates.
60“Forward” and “reverse” are design labels; either oligo can find hits in either
61orientation elsewhere. For linear reference intervals, a plus-direction binding
62site upstream and a minus-direction site downstream may form an inward-facing
63product. The product extends from the upstream primer's outer 5′ boundary to the
64downstream primer's outer 5′ boundary and includes both primers.
66Enumerate the two-oligo reaction's **F/R, F/F, and R/R** possibilities, not just the
67intended F/R orientation. For multiplex reactions, additionally evaluate
68cross-assay pairs. Primer-BLAST checks same-primer as well as mixed-primer products;
69this avoids overlooking inverted-repeat products.
70[Primer-BLAST publication](https://pmc.ncbi.nlm.nih.gov/articles/PMC3412702/).
72The bundled specificity CLI's `--multiplex` mode generates all cross-pair oligo
73combinations under a declared cap and preserves their source identities. All
74cross-pair products are classified as unintended in that mode. Assess intentional
75shared-primer designs using explicit standalone combinations and expected intervals.
77For circular templates, wrapped products cross coordinate zero. Use an explicitly
78supported circular search and a documented maximum product length; preserve
79original record length and wrapped coordinates. Doubling a reference without
80deduplication and length constraints can create misleading duplicate or
81multi-circumference products. Linear screening cannot clear origin-spanning risk.

Binding orientation and coordinates

Store oligos in synthesized 5′→3′ orientation. Relative to the supplied reference:

  • A primer equal to the plus-strand window has a plus-direction binding hit and extends toward increasing reference coordinates.
  • A primer equal to the reverse complement of that window has a minus-direction hit and extends toward decreasing reference coordinates.

“Forward” and “reverse” are design labels; either oligo can find hits in either orientation elsewhere. For linear reference intervals, a plus-direction binding site upstream and a minus-direction site downstream may form an inward-facing product. The product extends from the upstream primer's outer 5′ boundary to the downstream primer's outer 5′ boundary and includes both primers.

Enumerate the two-oligo reaction's F/R, F/F, and R/R possibilities, not just the intended F/R orientation. For multiplex reactions, additionally evaluate cross-assay pairs. Primer-BLAST checks same-primer as well as mixed-primer products; this avoids overlooking inverted-repeat products. Primer-BLAST publication.

The bundled specificity CLI's --multiplex mode generates all cross-pair oligo combinations under a declared cap and preserves their source identities. All cross-pair products are classified as unintended in that mode. Assess intentional shared-primer designs using explicit standalone combinations and expected intervals.

For circular templates, wrapped products cross coordinate zero. Use an explicitly supported circular search and a documented maximum product length; preserve original record length and wrapped coordinates. Doubling a reference without deduplication and length constraints can create misleading duplicate or multi-circumference products. Linear screening cannot clear origin-spanning risk.

Raw lines 51 to 82
83## Expected versus unintended products
85Supply intended **record and coordinate intervals**, not just a record-name
86allowlist. A chromosome can contain the intended site and many unintended sites.
87If several loci or isoforms are acceptable, list each explicitly with its rationale.
89Classify every predicted product against that specification. Report binding
90coordinates, primer identities, product length, total mismatches, and mismatch
91positions counted from the synthesized primer's 3′ end. Review expected products
92that are missing or mismatched separately from additional products.
94For a whole-reference reverse-complement transformation, `[start, end)` becomes
95`[L-end, L-start)` and the direction flips. This simple identity is useful for
96testing coordinate handling. An oligo's last base is its 3′ end on either strand;
97using the genomic window's last base unconditionally is wrong.

Expected versus unintended products

Supply intended record and coordinate intervals, not just a record-name allowlist. A chromosome can contain the intended site and many unintended sites. If several loci or isoforms are acceptable, list each explicitly with its rationale.

Classify every predicted product against that specification. Report binding coordinates, primer identities, product length, total mismatches, and mismatch positions counted from the synthesized primer's 3′ end. Review expected products that are missing or mismatched separately from additional products.

For a whole-reference reverse-complement transformation, [start, end) becomes [L-end, L-start) and the direction flips. This simple identity is useful for testing coordinate handling. An oligo's last base is its 3′ end on either strand; using the genomic window's last base unconditionally is wrong.

Raw lines 83 to 98
99## Interpreting mismatch settings
101A mismatch budget is a screening model, not a polymerase law. Mismatch identity,
102position, reaction conditions, and template abundance affect whether amplification
103occurs. Review especially plausible competing products even if they lie just
104outside a chosen bound. Compare total mismatch counts with the positions near each
105primer's 3′ end; do not summarize both as a single identity percentage.
107Use a stricter discovery model only when justified by the assay. Raising required
1083′ mismatches or decreasing a total-mismatch budget may reduce predicted products
109by definition; it does not improve the oligo. Keep settings constant when ranking
110candidates, or report the difference clearly.
112Ambiguous reference bases represent unknown or multiple possibilities. A sequence
113containing `N` should not be treated as strong evidence of an impossible binding
114site. Retain ambiguity warnings or resolve the sequence. Indel-containing primer
115alignments require an appropriate alignment method beyond a substitution-only
116screen.

Interpreting mismatch settings

A mismatch budget is a screening model, not a polymerase law. Mismatch identity, position, reaction conditions, and template abundance affect whether amplification occurs. Review especially plausible competing products even if they lie just outside a chosen bound. Compare total mismatch counts with the positions near each primer's 3′ end; do not summarize both as a single identity percentage.

Use a stricter discovery model only when justified by the assay. Raising required 3′ mismatches or decreasing a total-mismatch budget may reduce predicted products by definition; it does not improve the oligo. Keep settings constant when ranking candidates, or report the difference clearly.

Ambiguous reference bases represent unknown or multiple possibilities. A sequence containing N should not be treated as strong evidence of an impossible binding site. Retain ambiguity warnings or resolve the sequence. Indel-containing primer alignments require an appropriate alignment method beyond a substitution-only screen.

Raw lines 99 to 117
118## NCBI Primer-BLAST review workflow
120Use the [official interface](https://www.ncbi.nlm.nih.gov/tools/primer-blast/) to
121review candidate primers when public-reference searching is appropriate.
1231. Supply a versioned target record where available and both predesigned primers
124 in synthesized orientation. Specify the intended organism and suitable database.
1252. Set the maximum searched product length based on plausible competing products,
126 not merely the desired product range.
1273. Review specificity stringency, short-query sensitivity, and result/search caps.
128 Save the actual settings rather than assuming current web defaults.
1294. Review intended-target assignments and similar sequence matches manually. Do
130 not accept an off-target solely because its description shares a gene symbol.
1315. Save the complete report, retrieval date, database description, settings, and
132 result interpretation. A transient job URL is insufficient provenance.
134Current database help distinguishes `core_nt` (excludes assembled eukaryotic
135chromosomes), RefSeq reference genomes (includes applicable alternate loci), and
136selected-organism primary assemblies (excludes alternate loci). `core_nt` alone
137cannot establish genome-wide eukaryotic specificity. In **Custom** mode, the
138organism field is ignored; the supplied references determine scope. Verify the
139current field help when choosing an assembly or database.
141Primer-BLAST's minimum mismatches required for an unintended target to be accepted
142as discriminated is different from the local CLI's maximum mismatches retained as
143potential binding. Do not copy the same number between these controls and assume
144equivalent sensitivity. Its separate ignore-target threshold excludes a target
145when at least one primer reaches that total mismatch count.
147NCBI distinguishes the cap on database sequences searched from output display
148limits. Larger searches may reveal additional products. Exact reference accessions
149help distinguish intended targets from redundant records.
150[NCBI search tips](https://www.ncbi.nlm.nih.gov/tools/primer-blast/search_tips.html).
152Do not invent a supported Primer-BLAST API or substitute the general BLAST URL API
153for its pair-specific workflow. Any remote submission sends the submitted sequence
154to that service; use a local reference workflow when sequences must stay local.
155The linked Primer-BLAST URL returns an interactive HTML form/report workflow, not
156a documented JSON job-submission or pagination contract. No remote submission is
157implemented or required by the bundled scripts.

NCBI Primer-BLAST review workflow

Use the official interface to review candidate primers when public-reference searching is appropriate.

  1. Supply a versioned target record where available and both predesigned primers in synthesized orientation. Specify the intended organism and suitable database.
  2. Set the maximum searched product length based on plausible competing products, not merely the desired product range.
  3. Review specificity stringency, short-query sensitivity, and result/search caps. Save the actual settings rather than assuming current web defaults.
  4. Review intended-target assignments and similar sequence matches manually. Do not accept an off-target solely because its description shares a gene symbol.
  5. Save the complete report, retrieval date, database description, settings, and result interpretation. A transient job URL is insufficient provenance.

Current database help distinguishes core_nt (excludes assembled eukaryotic chromosomes), RefSeq reference genomes (includes applicable alternate loci), and selected-organism primary assemblies (excludes alternate loci). core_nt alone cannot establish genome-wide eukaryotic specificity. In Custom mode, the organism field is ignored; the supplied references determine scope. Verify the current field help when choosing an assembly or database.

Primer-BLAST's minimum mismatches required for an unintended target to be accepted as discriminated is different from the local CLI's maximum mismatches retained as potential binding. Do not copy the same number between these controls and assume equivalent sensitivity. Its separate ignore-target threshold excludes a target when at least one primer reaches that total mismatch count.

NCBI distinguishes the cap on database sequences searched from output display limits. Larger searches may reveal additional products. Exact reference accessions help distinguish intended targets from redundant records. NCBI search tips.

Do not invent a supported Primer-BLAST API or substitute the general BLAST URL API for its pair-specific workflow. Any remote submission sends the submitted sequence to that service; use a local reference workflow when sequences must stay local. The linked Primer-BLAST URL returns an interactive HTML form/report workflow, not a documented JSON job-submission or pagination contract. No remote submission is implemented or required by the bundled scripts.

Raw lines 118 to 158
159## Local BLAST review
161The BLAST+ `blastn-short` task is optimized for short nucleotide queries; its
162documented word size is seven. Query masking, scoring, E-value, subject/result
163limits, and database composition affect retrieval. Record them alongside the
164executable version and database metadata.
165[BLAST+ options](https://www.ncbi.nlm.nih.gov/sites/books/NBK279684/table/appendices.T.blastn_application_options/).
167For each discovery hit, retain the query ID, subject ID, orientation, query and
168subject alignment endpoints, gaps, and aligned strings or an equivalent trace.
169Recover the full-length window in the subject and check its complete alignment,
170including the 3′ end. Pair verified hits using reference geometry. A BLAST table of
171high-scoring single-primer matches is not an amplicon report.
173Separate these statements in the final interpretation:
175- No unintended products were **found** by this search.
176- The search completed **within its declared model and caps**.
177- The supplied references represent the required biological background.
178- Wet-lab evidence supports specificity **under tested conditions**.
180Only make the statements for which evidence exists. Even all four together apply
181to the stated assay and sample universe, not every possible biological sequence.

Local BLAST review

The BLAST+ blastn-short task is optimized for short nucleotide queries; its documented word size is seven. Query masking, scoring, E-value, subject/result limits, and database composition affect retrieval. Record them alongside the executable version and database metadata. BLAST+ options.

For each discovery hit, retain the query ID, subject ID, orientation, query and subject alignment endpoints, gaps, and aligned strings or an equivalent trace. Recover the full-length window in the subject and check its complete alignment, including the 3′ end. Pair verified hits using reference geometry. A BLAST table of high-scoring single-primer matches is not an amplicon report.

Separate these statements in the final interpretation:

  • No unintended products were found by this search.
  • The search completed within its declared model and caps.
  • The supplied references represent the required biological background.
  • Wet-lab evidence supports specificity under tested conditions.

Only make the statements for which evidence exists. Even all four together apply to the stated assay and sample universe, not every possible biological sequence.

Raw lines 159 to 181