bio-primer-design-qpcr-primers
Design qPCR primers and TaqMan/molecular beacon probes using primer3-py. Configure probe Tm, primer-probe spacing, and hydrolysis probe constraints for real-time PCR assays. Use when designing qPCR primers and probes.
What this skill does
## Version Compatibility
Reference examples tested with: BioPython 1.83+, pandas 2.2+, primer3-py 2.0+
Before using code patterns, verify installed versions match. If versions differ:
- Python: `pip show <package>` then `help(module.function)` to check signatures
If code throws ImportError, AttributeError, or TypeError, introspect the installed
package and adapt the example to match the actual API rather than retrying.
# qPCR Primer and Probe Design
Design primers and internal probes for quantitative PCR using primer3-py.
**"Design qPCR primers with probe"** -> Generate primer pairs plus internal TaqMan/molecular beacon probes with constrained Tm and spacing.
- Python: `primer3.design_primers(seq_args, global_args)` with `PRIMER_PICK_INTERNAL_OLIGO=1` (primer3-py)
## Required Imports
```python
import primer3
from Bio import SeqIO
```
## Design Primers with TaqMan Probe
```python
sequence = 'ATGCGTACGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCG' * 3
result = primer3.design_primers(
seq_args={'SEQUENCE_TEMPLATE': sequence},
global_args={
'PRIMER_PICK_LEFT_PRIMER': 1,
'PRIMER_PICK_RIGHT_PRIMER': 1,
'PRIMER_PICK_INTERNAL_OLIGO': 1, # Design internal probe
'PRIMER_PRODUCT_SIZE_RANGE': [[70, 150]], # Short amplicons for qPCR
'PRIMER_OPT_TM': 60.0,
'PRIMER_MIN_TM': 58.0,
'PRIMER_MAX_TM': 62.0,
'PRIMER_INTERNAL_OPT_TM': 70.0, # Probe Tm ~10C higher
'PRIMER_INTERNAL_MIN_TM': 68.0,
'PRIMER_INTERNAL_MAX_TM': 72.0,
'PRIMER_INTERNAL_MIN_SIZE': 18,
'PRIMER_INTERNAL_OPT_SIZE': 25,
'PRIMER_INTERNAL_MAX_SIZE': 30,
}
)
```
## Extract Probe Results
```python
num_returned = result['PRIMER_PAIR_NUM_RETURNED']
print(f'Found {num_returned} primer/probe sets')
for i in range(num_returned):
left = result[f'PRIMER_LEFT_{i}_SEQUENCE']
right = result[f'PRIMER_RIGHT_{i}_SEQUENCE']
probe = result[f'PRIMER_INTERNAL_{i}_SEQUENCE']
probe_tm = result[f'PRIMER_INTERNAL_{i}_TM']
left_tm = result[f'PRIMER_LEFT_{i}_TM']
right_tm = result[f'PRIMER_RIGHT_{i}_TM']
product_size = result[f'PRIMER_PAIR_{i}_PRODUCT_SIZE']
print(f'Set {i}:')
print(f' Forward: {left} (Tm: {left_tm:.1f}C)')
print(f' Reverse: {right} (Tm: {right_tm:.1f}C)')
print(f' Probe: {probe} (Tm: {probe_tm:.1f}C)')
print(f' Product: {product_size}bp')
```
## qPCR-Optimized Parameters
```python
result = primer3.design_primers(
seq_args={
'SEQUENCE_TEMPLATE': sequence,
'SEQUENCE_TARGET': [100, 30], # Target region for probe
},
global_args={
'PRIMER_PICK_INTERNAL_OLIGO': 1,
'PRIMER_PRODUCT_SIZE_RANGE': [[60, 100], [100, 150]], # Prefer short
'PRIMER_NUM_RETURN': 5,
# Primer parameters
'PRIMER_OPT_SIZE': 20,
'PRIMER_MIN_SIZE': 18,
'PRIMER_MAX_SIZE': 25,
'PRIMER_OPT_TM': 60.0,
'PRIMER_MIN_TM': 58.0,
'PRIMER_MAX_TM': 62.0,
'PRIMER_OPT_GC_PERCENT': 50.0,
'PRIMER_MIN_GC': 35.0,
'PRIMER_MAX_GC': 65.0,
# Probe parameters (TaqMan: Tm 8-10C higher than primers)
'PRIMER_INTERNAL_OPT_SIZE': 25,
'PRIMER_INTERNAL_MIN_SIZE': 18,
'PRIMER_INTERNAL_MAX_SIZE': 30,
'PRIMER_INTERNAL_OPT_TM': 70.0,
'PRIMER_INTERNAL_MIN_TM': 68.0,
'PRIMER_INTERNAL_MAX_TM': 72.0,
'PRIMER_INTERNAL_MIN_GC': 30.0,
'PRIMER_INTERNAL_MAX_GC': 70.0,
# Avoid G at 5' end of probe (quenches FAM)
'PRIMER_INTERNAL_MAX_SELF_ANY': 8,
}
)
```
## TaqMan Probe Constraints
```python
# Additional considerations for TaqMan probes
global_args = {
'PRIMER_PICK_INTERNAL_OLIGO': 1,
'PRIMER_PRODUCT_SIZE_RANGE': [[70, 150]],
# Probe Tm should be 8-10C higher than primers
'PRIMER_OPT_TM': 60.0,
'PRIMER_INTERNAL_OPT_TM': 70.0,
# Probe should be closer to forward primer
'PRIMER_INTERNAL_MIN_SIZE': 18,
'PRIMER_INTERNAL_MAX_SIZE': 30,
# Avoid long poly-X runs in probe
'PRIMER_INTERNAL_MAX_POLY_X': 3,
}
```
## SYBR Green Primers (No Probe)
```python
# For SYBR Green, design primers without probe
result = primer3.design_primers(
seq_args={'SEQUENCE_TEMPLATE': sequence},
global_args={
'PRIMER_PICK_LEFT_PRIMER': 1,
'PRIMER_PICK_RIGHT_PRIMER': 1,
'PRIMER_PICK_INTERNAL_OLIGO': 0, # No probe
'PRIMER_PRODUCT_SIZE_RANGE': [[70, 200]], # Short for qPCR
'PRIMER_OPT_TM': 60.0,
'PRIMER_MIN_TM': 58.0,
'PRIMER_MAX_TM': 62.0,
'PRIMER_MAX_SELF_ANY': 4, # Strict for SYBR specificity
'PRIMER_MAX_SELF_END': 2,
'PRIMER_PAIR_MAX_COMPL_ANY': 4,
'PRIMER_PAIR_MAX_COMPL_END': 2,
}
)
```
## Design for Exon-Spanning (Avoid Genomic DNA)
```python
# For cDNA-specific amplification, target exon junction
# Mark the exon junction position
exon_junction = 150 # Position where exons meet
result = primer3.design_primers(
seq_args={
'SEQUENCE_TEMPLATE': sequence,
'SEQUENCE_OVERLAP_JUNCTION_LIST': [exon_junction], # Primer must span
},
global_args={
'PRIMER_PRODUCT_SIZE_RANGE': [[70, 150]],
'PRIMER_OPT_TM': 60.0,
'PRIMER_MIN_3_PRIME_OVERLAP_OF_JUNCTION': 4, # Min bases on each side
}
)
```
## Multiplex Primer Design
```python
# Design primers for multiple targets with compatible Tms
targets = [
{'name': 'gene1', 'seq': sequence1, 'target': [100, 30]},
{'name': 'gene2', 'seq': sequence2, 'target': [150, 30]},
]
results = []
for target in targets:
result = primer3.design_primers(
seq_args={
'SEQUENCE_TEMPLATE': target['seq'],
'SEQUENCE_ID': target['name'],
'SEQUENCE_TARGET': target['target'],
},
global_args={
'PRIMER_PICK_INTERNAL_OLIGO': 1,
'PRIMER_PRODUCT_SIZE_RANGE': [[70, 150]],
'PRIMER_OPT_TM': 60.0, # Same Tm for all
'PRIMER_MAX_TM': 61.0,
'PRIMER_MIN_TM': 59.0,
'PRIMER_INTERNAL_OPT_TM': 70.0,
}
)
results.append(result)
```
## Validate Tm Calculations
```python
# Verify Tm with primer3's thermodynamic calculations
primer_seq = 'ATGCGATCGATCGATCGATC'
# Standard Tm
tm = primer3.calc_tm(primer_seq)
print(f'Standard Tm: {tm:.1f}C')
# Tm with specific salt conditions (match your qPCR master mix)
tm_adjusted = primer3.calc_tm(
primer_seq,
mv_conc=50.0, # Monovalent cation (K+, Na+) mM
dv_conc=3.0, # Divalent cation (Mg2+) mM
dntp_conc=0.8, # dNTP mM (reduces free Mg2+)
dna_conc=250.0, # Primer concentration nM
)
print(f'Adjusted Tm: {tm_adjusted:.1f}C')
```
## Format qPCR Results
```python
import pandas as pd
def qpcr_results_to_df(result):
rows = []
for i in range(result['PRIMER_PAIR_NUM_RETURNED']):
row = {
'pair': i,
'forward': result[f'PRIMER_LEFT_{i}_SEQUENCE'],
'reverse': result[f'PRIMER_RIGHT_{i}_SEQUENCE'],
'fwd_tm': result[f'PRIMER_LEFT_{i}_TM'],
'rev_tm': result[f'PRIMER_RIGHT_{i}_TM'],
'product_size': result[f'PRIMER_PAIR_{i}_PRODUCT_SIZE'],
}
if f'PRIMER_INTERNAL_{i}_SEQUENCE' in result:
row['probe'] = result[f'PRIMER_INTERNAL_{i}_SEQUENCE']
row['probe_tm'] = result[f'PRIMER_INTERNAL_{i}_TM']
rows.append(row)
return pd.DataFrame(rows)
df = qpcr_results_to_df(result)
print(df)
```
## qPCR Design Guidelines
| Parameter | Primers | TaqMan Probe |
|-----------|---------|--------------|
| Length | 18-25 bp | 18-30 bp |
| Tm | 58-62C | 68-72C |
| GC% | 35-65% | 30-70% |
| Amplicon | 70-150 bp | - |
| 5' base | Any | Avoid G (quenches FAM) |
## Related Skills
- primer-basics - General PCR primer design
- primer-validation - Check primers for dimers and specificity
- sequence-manipulation/transcription-translation - Work with cDNA sequences
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.