Skip to content

ribokit/Primerize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

192 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Primerize

Primerize Logo

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.

Installation

pip install git+https://github.com/ribokit/Primerize.git

Or 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

Loop Optimization with numba (Optional)

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.

Test

To test if Primerize is functioning properly, run the unit tests:

cd path/to/Primerize/tests/
python -m unittest discover

All 42 test cases should pass.

Use with Claude Code or AI Assistants

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

Usage

1D Primer Design (single construct)

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 ordering

2D Mutate-and-Map Library (96-well plates)

job_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 images

3D Structure-Based Library

structures = ['...........................((((((.....))))))...........((((((..((((((.....(((.((((.(((..(((((((((....)))))))))..((.......))....)))......)))))))....))))))..)).))))((... ((((...(((((((((...)))))))))..))))...)).............((((((.....))))))......................']
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.

Documentation

License

Copyright © of Primerize Source Code is described in LICENSE.md.

Reference

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.

About

Archive of primer design and nucleic acid thermodynamics scripts used by the Das lab at Stanford for high-throughput RNA synthesis and design.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors