Spaces:
Sleeping
Sleeping
Commit History
-
Primer Picker: add strict 3'-end matching knob for the specificity scan
Tengo Gzirishvili +1: Claude Opus 4.8Off-target predictions are *priming sites*, not guaranteed amplicons — and whether a polymerase extends is governed by the 3' terminus. This adds an opt-in stringency control: when on, an off-target priming site only counts if its 3'-terminal 5 bases match the subject perfectly (no mismatch, no gap), trimming borderline sites that share a body but mismatch at the 3' end. - server.py: _three_prime_clean() inspects the tail of the BLAST alignment strings (match/query/sbjct); _hsp_to_event(strict_3p) rejects a hit whose 3' end isn't clean. PrimerJob.three_prime_strict; /api/primers/analyze accepts `strict_3p` (folded into the cache key). Degrades to lenient if the alignment strings aren't present. - Frontend: "Strict 3'-end matching" sub-toggle under the organism selector (shown with the scan), sent as strict_3p. Default off = catch borderline sites too (safer for screening); on = fewer, higher-confidence predictions. Tests: _three_prime_clean (perfect / 3'-mismatch / within…438edb5 -
Primer Picker: separate intended product from off-targets; collapse redundant hits
Tengo Gzirishvili +1: Claude Opus 4.8Live test surfaced a real problem: running the GAPDH/ACTB primers against Human reported "60 unintended products" and branded a perfectly specific pair with "38 off-target products." Those weren't off-targets at all — `nt` holds dozens of redundant GAPDH records, so the ONE intended 197 bp amplicon was counted once per database entry. That's the opposite of helpful. Fix (rank()): - Collapse in-silico PCR hits that are the same primer pair at the same size (±5 bp) into ONE distinct amplicon, with a "seen in N records" count. - Classify distinct amplicons: a detected F/R pair's amplicon at its expected size (on-template size when given, else the pair's dominant size) is the INTENDED product; the same pair at a different size (e.g. a pseudogene) or any cross-/unpaired combo is a genuine off-target. - Per-primer off-target count now counts only true off-target distinct amplicons, so fitness + chips stop punishing specific primers. Frontend: results now show an "Intended product…7df48f4 -
Primer Picker: full in-silico PCR specificity — no more "go to NCBI Primer-BLAST"
Tengo Gzirishvili +1: Claude Opus 4.8The footer used to send users to NCBI Primer-BLAST to finish the job, which defeats the point of an in-house tool. The reason was v1 only counted per-primer matches, not the paired off-target AMPLICONS that Primer-BLAST uniquely finds. Now we do that check ourselves so the workflow is complete here and the user never leaves. - core/primers.py: insilico_pcr() pairs every forward-oriented priming site with every downstream reverse-oriented site on the same subject within MAX_PRODUCT (4 kb) → predicted PCR products, exactly like Primer-BLAST's specificity step. rank() now folds off-target *product* counts (not raw match counts) into fitness + reasoning and surfaces the product list. - server.py: _hsp_to_event() converts a BLAST HSP to a 3'-anchored priming event (strand from sbjct_start/end; rejects 5'-only / low-identity hits); _run_primer_blast() builds events across ALL primers, runs in-silico PCR, and attributes products per primer. Adds organism targeting (entrez_query…eeea851
-
Add Primer Picker: batch-analyse primers, rank, recommend the best
Tengo Gzirishvili +1: Claude Opus 4.8New feature requested by the user: instead of BLASTing candidate primers one at a time and eyeballing which best amplifies their template, paste them all, analyse in one shot, and get a ranked recommendation. What it does: * Parse a batch (FASTA or one-per-line) with optional names + F/R tags; forward/reverse pairs are auto-detected by name stem. * Score each primer ON the user's template (private, on-server): 3'-anchored binding site(s), uniqueness, Tm (NN), GC, 3' G/C clamp, hairpin, 3' self-dimer. * For F/R pairs: amplicon size, Tm match, 3' cross-dimer. * Opt-in NCBI specificity scan — ALL primers in ONE blastn-short submission ("blast them all together"); NCBIXML yields one record per primer, mapped back by query order; counts strong full-length off-target matches. * Transparent fitness rubric in [0,1] (Tm/GC/clamp/dimer/uniqueness/ specificity) ranks them and recommends the best primer + best pair, with the reasoning shown — not a black box.…f0c3f5a