primer-design/qpcr-primers/SKILL.md
Co-designs qPCR/RT-qPCR primers and hydrolysis (TaqMan) or molecular-beacon probes with primer3-py (PRIMER_PICK_INTERNAL_OLIGO, PRIMER_INTERNAL_* tags), for assays whose deliverable is a quantitative measurement device. Covers why amplification efficiency (90-110%, slope -3.6 to -3.1) and single-product specificity make the 2^-ddCq / Pfaffl math valid, why the short amplicon (70-150 bp), tight Tm, and zero-dimer requirement exist, the coupled probe rules (probe Tm 8-10 C above primers so it is bound when Taq's exonuclease cleaves it; no 5' G as it quenches the reporter; C-rich strand; primer3 has NO no-5'-G tag so enforce PRIMER_INTERNAL_MUST_MATCH_FIVE_PRIME=HNNNN), gDNA exclusion by exon-junction spanning AND why pseudogenes defeat it, SYBR melt-curve QC, and reference-gene validation (geNorm/NormFinder). Use when designing TaqMan/SYBR assays, exon-spanning primers, probes, or matched-efficiency multiplex panels. Genome specificity is primer-specificity; dimers primer-validation; standard PCR primer-basics.
npx skillsauth add GPTomics/bioSkills bio-primer-design-qpcr-primersInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reference examples tested with: primer3-py 2.3+.
Before using code patterns, verify installed versions match. If versions differ:
pip show primer3-py then help(primer3.design_primers) to check signaturesIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
"Design qPCR primers (and a probe) for this target" -> Co-design a short, single-product, Tm-matched amplicon with an optional internal probe whose constraints are coupled to the primers -- because the assay's job is not to amplify but to MEASURE, and every qPCR-specific rule protects the efficiency the quantification math assumes.
primer3.design_primers(seq_args, global_args) with PRIMER_PICK_INTERNAL_OLIGO=1 and PRIMER_INTERNAL_* for the probe.Scope: co-designing qPCR/RT-qPCR primers and hydrolysis/beacon probes under coupled Tm/size/junction constraints. Genome-wide specificity / pseudogene checking -> primer-specificity. Intramolecular dimers/hairpins of the oligos and probe -> primer-validation. Standard (non-quantitative) PCR -> primer-basics.
(1+E)^-dCq (at ideal E=1, 2^-ddCq). That requires amplification efficiency E ~ 90-110% (standard-curve slope -3.6 to -3.1, R^2 > 0.99) AND a single product. The short amplicon (70-150 bp), tight Tm, and zero-dimer requirement all exist to protect E and specificity. 2^-ddCq is valid ONLY when the target and reference-gene efficiencies are matched and near 100% -- so design for matched ~100% E, or fall back to Pfaffl's efficiency-corrected model.PRIMER_INTERNAL_MUST_MATCH_FIVE_PRIME='HNNNN' (IUPAC H = not G) or a post-hoc filter. This is the hydrolysis (TaqMan) probe path; a molecular beacon needs engineered complementary stem arms (a deliberate hairpin) that primer3's internal-oligo picker does NOT design and would flag as a liability -- design the linear core here, add the stem afterward, and exclude that hairpin from validation.Efficiency from a standard curve: E = 10^(-1/slope) - 1; perfect doubling is slope -3.32 (E = 100%). Relative quantification with matched ~100% efficiency uses 2^-ddCq (Livak & Schmittgen 2001 Methods 25:402); with UNEQUAL efficiencies use the efficiency-corrected ratio E_target^dCq / E_ref^dCq (Pfaffl 2001 Nucleic Acids Res 29:e45). Report per MIQE (Bustin 2009 Clin Chem 55:611): efficiency, slope, R^2, Cq method, NTC and no-RT controls, and validated reference genes. The design objective is therefore "single short amplicon with slope near -3.32," not "two oligos that amplify."
| Tool / method | Citation | Mechanism / role | When |
|---------------|----------|------------------|------|
| primer3-py internal oligo | Untergasser 2012 Nucleic Acids Res 40:e115 | PRIMER_PICK_INTERNAL_OLIGO=1 + PRIMER_INTERNAL_* co-designs the probe with the primers | TaqMan / hydrolysis-probe assays |
| PRIMER_INTERNAL_MUST_MATCH_FIVE_PRIME | Untergasser 2012 Nucleic Acids Res 40:e115 | constrains the probe 5' end (use HNNNN to forbid 5'-G) | enforce the no-5'-G probe rule |
| SEQUENCE_OVERLAP_JUNCTION_LIST | Untergasser 2012 Nucleic Acids Res 40:e115 | forces a primer/probe to straddle a splice junction | cDNA-specific expression assays |
| MIQE reporting | Bustin 2009 Clin Chem 55:611 | the minimum information / efficiency-from-standard-curve standard | every quantitative assay |
| geNorm / NormFinder | Vandesompele 2002 Genome Biol 3:RESEARCH0034; Andersen 2004 Cancer Res 64:5245 | rank reference-gene stability | choosing normalizers, validated per condition |
| In-silico PCR (genome) | (route OUT) | catches pseudogenes / gDNA off-targets | mandatory gDNA/specificity check -> primer-specificity |
| Scenario | Recommended | Why |
|----------|-------------|-----|
| Probe-based (multiplex-capable, second specificity check) | TaqMan: PRIMER_PICK_INTERNAL_OLIGO=1, probe Tm 8-10 C above primers, HNNNN 5' | the probe adds sequence specificity and enables multiplex |
| Single target, cheapest, no probe | SYBR (no internal oligo) + mandatory melt-curve QC | dye reports any dsDNA; melt curve is the specificity readout |
| Expression assay, avoid gDNA | exon-junction-spanning primers (SEQUENCE_OVERLAP_JUNCTION_LIST) | the junction does not exist contiguously in unspliced gDNA |
| Gene has a processed pseudogene | junction-spanning is NOT enough -> primer-specificity (search genome) + no-RT control | the pseudogene carries the junction |
| Single-exon gene (no junction) | DNase + no-RT control; no design-level gDNA exclusion | there is no intron/junction to exploit |
| AT-rich target / allele discrimination | MGB or LNA probe (shorter, higher effective Tm) | raises probe Tm where a standard probe cannot reach |
| Multiplex panel | spectrally distinct fluorophores, matched E, primer-limiting, all-pairs cross-dimer | competition and cross-dimers dominate; primer-limiting = drop the abundant target's primer concentration so it plateaus early and stops starving the rare target of shared reagents |
| Choosing normalizers | rank a candidate panel with geNorm/NormFinder, validate per condition | a single unvalidated reference gene is a classic error |
Default when uncertain: TaqMan primers+probe, amplicon 70-150 bp, primers Tm ~60 C (within 2 C), probe Tm ~68-70 C with HNNNN, exon-junction-spanning for expression, then route the pair to primer-specificity and run a standard curve.
Goal: Produce a short, Tm-matched amplicon with an internal probe whose Tm is 8-10 C above the primers and whose 5' base is not G.
Approach: Turn on internal-oligo picking, set the primer Tm window and a short product range, RAISE the PRIMER_INTERNAL_* Tm window 8-10 C above the primers (the defaults equal the primer Tm), and forbid a 5'-G probe with PRIMER_INTERNAL_MUST_MATCH_FIVE_PRIME='HNNNN'. For an expression assay add SEQUENCE_OVERLAP_JUNCTION_LIST.
import primer3
template = 'ATGC...' # cDNA (mark the junction position if expression-specific)
result = primer3.design_primers(
seq_args={'SEQUENCE_ID': 'assay1', 'SEQUENCE_TEMPLATE': template},
global_args={
'PRIMER_PICK_LEFT_PRIMER': 1, 'PRIMER_PICK_RIGHT_PRIMER': 1,
'PRIMER_PICK_INTERNAL_OLIGO': 1, # design the probe
'PRIMER_PRODUCT_SIZE_RANGE': [[70, 150]], # short amplicon for efficiency
'PRIMER_NUM_RETURN': 3,
'PRIMER_OPT_TM': 60.0, 'PRIMER_MIN_TM': 58.0, 'PRIMER_MAX_TM': 62.0,
'PRIMER_PAIR_MAX_DIFF_TM': 2.0,
'PRIMER_INTERNAL_OPT_TM': 70.0, 'PRIMER_INTERNAL_MIN_TM': 68.0, 'PRIMER_INTERNAL_MAX_TM': 72.0,
'PRIMER_INTERNAL_MUST_MATCH_FIVE_PRIME': 'HNNNN', # IUPAC H = A/C/T = not G at the probe 5' end
# 'SEQUENCE_OVERLAP_JUNCTION_LIST': [junction_pos], # add for cDNA-specific assays
})
for i in range(result['PRIMER_PAIR_NUM_RETURNED']):
probe = result[f'PRIMER_INTERNAL_{i}_SEQUENCE']
print(result[f'PRIMER_LEFT_{i}_SEQUENCE'], result[f'PRIMER_RIGHT_{i}_SEQUENCE'], probe,
'probe5=', probe[0], 'probeTm=', round(result[f'PRIMER_INTERNAL_{i}_TM'], 1),
'size=', result[f'PRIMER_PAIR_{i}_PRODUCT_SIZE'])
For a cDNA-specific assay, place a primer or the probe across a splice junction with SEQUENCE_OVERLAP_JUNCTION_LIST = [pos] plus PRIMER_MIN_3_PRIME_OVERLAP_OF_JUNCTION (default 4) and PRIMER_MIN_5_PRIME_OVERLAP_OF_JUNCTION (default 7); the 3' overlap is the specificity-determining knob because a primer that only overlaps at its 5' end can still prime off gDNA from its 3' anchor. The internal-oligo equivalents (PRIMER_INTERNAL_MIN_3_PRIME_OVERLAP_OF_JUNCTION / _5_PRIME_) constrain the probe. The hard caveat: this does NOT protect against processed pseudogenes, which typically carry the junction in DNA -- so the assay still needs a genome specificity check (-> primer-specificity), DNase treatment, and a no-RT control. Intron-flanking (primers in different exons across a large intron) is the alternative, but fails across tiny introns.
Multiplex is the most failure-prone mode; assemble it in order: (1) design each assay independently (short amplicon, matched Tm, probe offset); (2) check ALL primer+probe oligos pairwise for cross-dimers -- for k assays that is O((2k primers + k probes)^2) checks (a 5-plex = 10 primers + 5 probes = 105 pairwise calls), weighting 3'-end involvement (-> primer-validation); (3) run in-silico PCR over the POOLED primer set so cross-pair amplicons (one assay's forward meeting another's reverse) are caught (-> primer-specificity); (4) assign spectrally distinct fluorophores -- the instrument's optical channels and spectral overlap CAP the plex (most platforms resolve ~4-6 dyes, with color compensation), so the channel count, not the chemistry, usually limits a high-plex; (5) match efficiencies on a multiplex standard curve and primer-limit the abundant targets so they do not starve the rare ones.
Trigger: Applying 2^-ddCq without a standard curve. Mechanism: the method assumes target and reference efficiencies are matched and ~100%; if not, fold-changes are systematically biased. Symptom: numbers that are not measurements; results that do not replicate across instruments. Fix: run a standard curve, report E/slope/R^2 (MIQE), and use Pfaffl if efficiencies differ.
Trigger: Leaving PRIMER_INTERNAL_* Tm at the default (equal to the primers). Mechanism: the probe is not bound when the polymerase extends through it, so the exonuclease never cleaves it. Symptom: weak or no TaqMan signal. Fix: raise the internal Tm window 8-10 C above the primer window.
Trigger: Not forbidding a 5' guanine. Mechanism: a 5'-G quenches the reporter even after cleavage. Symptom: low signal despite good amplification. Fix: PRIMER_INTERNAL_MUST_MATCH_FIVE_PRIME='HNNNN' or filter returned probes; prefer the C-rich strand.
Trigger: Trusting junction-spanning alone. Mechanism: processed pseudogenes carry the spliced junction in genomic DNA. Symptom: a positive no-RT control; a genomic amplicon at the cDNA size. Fix: genome specificity check (primer-specificity), DNase, and a no-RT control.
Trigger: Any extendable cross-dimer with SYBR detection. Mechanism: the dye reports the dimer, which competes with and can swamp a low-copy target. Symptom: a low-Tm shoulder in the melt curve; inflated NTC/low-copy signal. Fix: inspect the melt curve for a single sharp peak; validate dimers at reaction conditions (primer-validation).
Trigger: Normalizing to GAPDH/ACTB by habit. Mechanism: the reference may itself be regulated by the treatment. Symptom: apparent target changes that track a moving normalizer. Fix: rank a candidate panel with geNorm/NormFinder and validate stability in the actual experimental conditions.
| Threshold | Source | Rationale |
|-----------|--------|-----------|
| Efficiency 90-110% (slope -3.6 to -3.1, ideal -3.32), R^2 > 0.99 | Bustin 2009 Clin Chem 55:611 | the acceptance band that keeps 2^-ddCq valid |
| Amplicon 70-150 bp | Bustin 2009 Clin Chem 55:611 | short products denature/re-prime fully each short cycle -> ~100% E |
| Primer Tm ~58-62 C, pair within 2 C | Koressaar & Remm 2007 Bioinformatics 23:1289 | one anneal-extend temperature; matched so neither lags |
| Probe Tm 8-10 C above primer Tm | -- | probe bound before/during extension so the exonuclease can cleave it |
| Probe: no 5'-G, prefer C-rich strand | -- | a 5'-G (and G-richness) quenches the reporter; the standard rule for 5'-reporter hydrolysis probes (reporter/quencher-chemistry dependent) |
| Standard curve: 5-6 points, 10-fold, triplicate | Bustin 2009 Clin Chem 55:611 | defines E, R^2, dynamic range, LOD |
| Reference genes: >=2 validated | Vandesompele 2002 Genome Biol 3:RESEARCH0034 | geometric mean of stable references beats one gene |
| Error / symptom | Cause | Solution |
|-----------------|-------|----------|
| Weak/no TaqMan signal | probe Tm too low, or 5'-G | raise PRIMER_INTERNAL_* Tm 8-10 C; HNNNN; C-rich strand |
| No probe returned (0 pairs) | internal Tm window unreachable on this template | widen/lower internal Tm or product range; check with PRIMER_EXPLAIN_FLAG=1 |
| Positive no-RT control | gDNA / pseudogene amplification | junction-span + genome check (primer-specificity) + DNase |
| Poor efficiency (slope steep/shallow) | amplicon too long, dimers, off-target, or template inhibitors/degraded standard | shorten amplicon, fix dimers (primer-validation), check specificity, clean up template |
| Low-Tm melt peak (SYBR) | primer-dimer | redesign to remove 3'-end cross-dimers (primer-validation) |
| Fold-changes do not replicate | unmatched efficiency, unvalidated reference | match E or use Pfaffl; validate references with geNorm/NormFinder |
development
Installs 425 bioinformatics skills covering sequence analysis, RNA-seq, single-cell, variant calling, metagenomics, structural biology, and 56 more categories. Use when setting up bioinformatics capabilities or when a bioinformatics task requires specialized skills not yet installed.
testing
Chains a somatic (tumor-normal) SNV/indel and structural-variant pipeline end to end with GATK Mutect2 (or Strelka2), wiring the somatic-specific machinery - panel-of-normals and gnomAD germline-resource priors, GetPileupSummaries/CalculateContamination, and LearnReadOrientationModel FFPE/oxoG orientation-bias filtering fed into FilterMutectCalls. Use when calling somatic mutations from a tumor-normal pair (or tumor-only with PoN caveats), deciding which artifact filter removes which class of false positive, reasoning about VAF/purity/ploidy and clonal-vs-subclonal detection, adding somatic SV/CNV or TMB/MSI/signatures, or routing variants to AMP/ASCO/CAP tier and oncogenicity interpretation (never germline ACMG).
development
End-to-end pooled and single-cell CRISPR screen analysis from FASTQ to hit genes. Orchestrates library design QC, guide counting, six-stage screen QC (plasmid Gini, replicate Pearson, CEGv2 PR-AUC, copy-number artifact), method-appropriate hit calling across MAGeCK RRA/MLE, BAGEL2, drugZ, JACKS, and Chronos, cancer-cell-line copy-number correction (CRISPRcleanR / Chronos), batch correction for multi-batch screens, and the specialized branches for combinatorial paralog screens, single-cell Perturb-seq, base-editor variant-function screens, prime-editor screens, and in vivo bottleneck-aware screens. Use when analyzing any pooled CRISPR screen end-to-end, matching the hit-calling method to the experimental design, integrating copy-number correction into the pipeline, or branching the workflow for single-cell, combinatorial, base-editor, prime-editor, or in vivo variants.
development
Transcribe DNA to RNA and translate to protein using Biopython, with NCBI codon-table selection, CDS validation, and six-frame ORF finding. Use when converting a CDS or ORF to its amino-acid sequence, selecting a non-standard (mitochondrial, bacterial, ciliate) genetic code, validating a coding sequence, or scanning all reading frames.