Skip to main content

PCR Primer Design Guide

A complete walkthrough of the PCR primer design workflow.

Overview

This guide covers:
  1. Configuration setup
  2. Running the design
  3. Understanding output
  4. Validating primers
  5. Exporting for ordering

1. Prepare Your Sequence

PrimerLab accepts sequences in two ways: Option A: Inline sequence
input:
  sequence: "ATGCGATCGATCG..."
Option B: FASTA file
input:
  sequence_path: /path/to/gene.fasta

2. Configure Parameters

Create pcr_config.yaml:
input:
  sequence_path: ./my_gene.fasta

parameters:
  # Melting temperature
  tm:
    min: 57.0
    opt: 60.0
    max: 63.0
  
  # Primer length
  primer_size:
    min: 18
    opt: 20
    max: 25
  
  # Amplicon size
  product_size:
    min: 200
    max: 500
  
  # GC content
  gc:
    min: 40.0
    max: 60.0

output:
  format: json
  directory: ./output

Parameter Recommendations

ApplicationProduct SizeTmNotes
Cloning200-2000 bp58-62°CStandard
Colony PCR300-1000 bp55-60°CFast cycling
Long-range2000-10000 bp62-68°CLong primers
Diagnostic100-500 bp58-62°CSpecific

3. Run the Design

primerlab run pcr --config pcr_config.yaml

Available Options

primerlab run pcr \
  --config pcr_config.yaml \
  --out results/ \
  --export idt,benchling \
  --report \
  --report-format html
FlagPurpose
--outCustom output directory
--exportGenerate ordering files
--reportGenerate enhanced report
--mask autoExclude repeat regions
--validateRun in-silico PCR
--blastCheck off-targets

4. Understand the Output

Output Files

FileDescription
primers.jsonFull results with all metrics
report.mdHuman-readable summary
primers_idt.csvIDT ordering format
audit.jsonDesign parameters used

Primer Quality Scores

Each primer pair receives a score (0-100) based on:
FactorWeightCriteria
Tm match25%Closeness to optimal
GC content20%Within 40-60%
Self-dimer20%ΔG > -5 kcal/mol
Hairpin15%ΔG > -2 kcal/mol
3’ stability20%No runs of G/C

5. Validate Primers

In-silico PCR

Verify primers amplify the correct region:
primerlab insilico \
  -p output/primers.json \
  -t my_gene.fasta

Off-target Check

Check specificity against a genome:
primerlab blast \
  -p output/primers.json \
  -d /path/to/genome.fasta

Compatibility Check

Verify no primer dimers:
primerlab check-compat -p output/primers.json

6. Export for Ordering

Generate files for synthesis vendors:
# IDT format
primerlab run pcr -c config.yaml --export idt

# Multiple formats
primerlab run pcr -c config.yaml --export idt,sigma,thermo

Supported Vendors

VendorFormatNotes
IDTCSVIncludes scale/purification
SigmaCSVReady for upload
ThermoXLSXExcel format
BenchlingCSVAPI-compatible

Complete Example

# 1. Create config
cat > gene_amplification.yaml << 'EOF'
input:
  sequence_path: ./BRCA1_exon1.fasta

parameters:
  tm:
    opt: 60.0
  product_size:
    min: 200
    max: 400
  gc:
    min: 45.0
    max: 55.0

output:
  include_rationale: true
EOF

# 2. Design primers
primerlab run pcr \
  --config gene_amplification.yaml \
  --validate \
  --report \
  --export idt

# 3. Review results
cat primerlab_output/report.md

Troubleshooting

No primers found
  • Relax constraints (wider Tm range, larger product size)
  • Check sequence for repeat regions (primerlab stats gene.fasta)
Poor quality scores
  • Sequence may have challenging regions (high GC, repeats)
  • Try --mask auto to avoid problematic areas
Primers form dimers
  • Run primerlab check-compat on results
  • Choose pairs with higher compatibility scores

Next Steps