Primerize is a Python package for PCR assembly primer design, developed by the Das Lab at Stanford University for high-throughput RNA synthesis.
The algorithm designs forward (sense strand) and reverse (anti-sense strand) primers that minimize the total length, and therefore the total synthesis cost, of the oligonucleotides.
| Website | https://primerize.stanford.edu/ |
| Protocol | https://primerize.stanford.edu/protocol/ |
| Documentation | https://ribokit.github.io/Primerize/ |
| Site repo | https://github.com/DasLab/primerize.github.io |
Note: The interactive Primerize web server was decommissioned in May 2026. Use this Python package directly — see Usage below, or try the Claude Code prompt.
pip install git+https://github.com/ribokit/Primerize.gitOr from a local clone:
git clone https://github.com/ribokit/Primerize.git
cd Primerize
pip install .Dependencies (installed automatically via pip):
matplotlib >= 1.5.0
numpy >= 1.10.1
xlwt >= 1.0.0
To speed up Primerize code, we take advantage of the @jit decorator of numba on loop optimization. This is totally optional. Enabling such feature may speed up the run for up to 10x.
To test if Primerize is functioning properly, run the unit tests:
cd path/to/Primerize/tests/
python -m unittest discoverAll 42 test cases should pass.
Paste this prompt into Claude Code or another AI coding assistant to design primers for your sequence:
Help me design PCR assembly primers for my RNA construct using the Primerize
Python package (https://github.com/ribokit/Primerize).
1. Install: pip install git+https://github.com/ribokit/Primerize.git
2. Run:
import primerize
sequence = "PASTE_YOUR_SEQUENCE_HERE" # RNA or DNA, any case
result = primerize.Primerize_1D.design(sequence)
if result.is_success:
print(result)
result.save() # writes primer file with sequences for IDT ordering
My sequence is: PASTE_YOUR_SEQUENCE_HERE
import primerize
sequence = 'TTCTAATACGACTCACTATAGGCCAAAGGCGUCGAGUAGACGCCAACAACGGAAUUGCGGGAAAGGGGUCAACAGCCGUUCAGUACCAAGUCUCAGGGGAAACUUUGAGAUGGCCUUGCAAAGGGUAUGGUAAUAAGCUGACGGACAUGGUCCUAACCACGCAGCCAAGUCCUAAGUCAACAGAUCUUCUGUUGAUAUGGAUGCAGUUCAAAACCAAACCGUCAGCGAGUAGCUGACAAAAAGAAACAACAACAACAAC'
job_1d = primerize.Primerize_1D.design(sequence, MIN_TM=60.0, prefix='P4P6')
if job_1d.is_success:
print(job_1d)
job_1d.save() # writes P4P6.txt with primer sequences for IDT orderingjob_2d = primerize.Primerize_2D.design(sequence, primer_set=job_1d['primer_set'],
offset=-51, which_lib=1, prefix='P4P6')
if job_2d.is_success:
print(job_2d)
job_2d.save() # writes .xls plate files (for IDT plate ordering) + .svg layout imagesstructures = ['...........................((((((.....))))))...........((((((..((((((.....(((.((((.(((..(((((((((....)))))))))..((.......))....)))......)))))))....))))))..)).))))((... ((((...(((((((((...)))))))))..))))...)).............((((((.....))))))......................']
job_3d = primerize.Primerize_3D.design(sequence, primer_set=job_1d['primer_set'],
offset=-51, structures=structures,
N_mutations=1, which_lib=1)
if job_3d.is_success:
print(job_3d)
job_3d.save()For advanced usage — get(), save(), echo(), custom mutation lists — see the Documentation.
- Full docs: https://ribokit.github.io/Primerize/
- Protocol: https://primerize.stanford.edu/protocol/
Copyright © of Primerize Source Code is described in LICENSE.md.
Tian, S., et al. (2015)
Primerize: Automated Primer Assembly for Transcribing Interesting RNAs.
Nucleic Acid Research 43 (W1): W522-W526.
Tian, S., and Das, R. (2017)
Primerize-2D: automated primer design for RNA multidimensional chemical mapping.
Bioinformatics 33 (9): 1405-1406.
Developed by Das Lab, Stanford University / HHMI.
