Skip to main content

PCR primer design & optimization pipeline

Project description

PRISM - Primer Design through Submodular Function Estimation

User Guide

PRISM (PRImer Selection through Submodular Maximization) is an open-source software tool for automated design of multiplex PCR primers, developed to support viral genome sequencing, pathogen surveillance, and other high-throughput molecular biology applications. Released under the GNU General Public License (GPL), PRISM is freely available and encourages community use, extension, and collaboration.

PRISM introduces a principled optimization framework that formulates the primer design task as a constrained submodular maximization problem, balancing two competing objectives: maximizing genome coverage and minimizing undesired primer-primer interactions, quantified using the Badness value. This formulation allows PRISM to leverage a fast local search algorithm with a provable constant-factor approximation guarantee, making it the first primer design method to combine rigorous theoretical guarantees with practical scalability.

In extensive evaluations on viral genome datasets such as foot-and-mouth disease virus (FMDV) and Zika virus, PRISM consistently outperforms leading tools—including PrimalScheme, Olivar, and primerJinn—achieving significantly lower Badness values, tighter distributions of primer quality, and robust genome coverage with low memory usage and runtime.

PyPI License


Installation

Requirements

– Python ≥ 3.9.
– Linux, macOS or Windows

Runtime dependencies (primer3‑py, numpy, pandas, tqdm, numba, joblib) will be installed automatically.

Installation from PyPI using pip

Recommend create and activate a virtual environment:

python3 -m venv /path/to/prism
source /path/to/prism/bin/activate

Or using conda:

conda create -n prism python=3.9 -y
conda activate prism

Please use the following command to install:

pip install prism-bio

Once the installation is complete, use the following commands to check PRISM's version:

prism --version

General usage

Input files

PRISM requires a reference genome in FASTA format as input. This file should contain one or more nucleotide sequences in standard FASTA format. For optimal results in multiplex primer design, the input should represent a high-quality reference or consensus sequence derived from your target population or viral strain.


Command-line interface

PRISM accepts three main sub-commands, input (required), block (optional, with a default size of 250 bp), extend (optional, with a default size of 100 bp) and output (optional, specifies file name and output path):

CLI options

Flag Default Description
-i--input required Input FASTA/FA file
-b--block-size 250 bp Block size for region slicing
-e--extend-block-size 100 bp Block extension size during optimisation
-o--output-csv optimized_primers.csv Output file (CSV)

Full help:

prism --help
or
prism -h

Example usage

# Run PRISM on a Zika reference, 300 bp blocks, 100 bp block extend size, export CSV
prism \
  -i data/NC_012532.1.fna \
  -b 250 \
  -e 100 \
  -o output/optimized_primers.csv

You can find this example file NC_012532.1.fna in example input. This is the Zika virus sequence from the NCBI dataset.


Generate files

The process ends with a .csv file in the form of the following table:

Primer ID Left Primer Right Primer
Primer 1 GTGTGA… CGTAGC…
Primer 2 GCGTAC… TAGCCA…
Primer…  ……………… ………………

This file will provide the designed primer serial numbers as well as the sequence


Developer Setup

git clone https://github.com/William-A-Wang/PRISM.git
python -m venv .venv && . .venv/Scripts/activate
pip install -e .[dev]

Using this approach, you can deploy code locally while performing development-related activities


External resources

We used Olivar's badness calculation function in our code, but modified some of the parameters.

We also used primer3 as the initial primer generation.


License

PRISM is released under the GNU GPL v3.0.

See the LICENSE file for details.


Citing PRISM

If you use PRISM in an academic setting, please cite:

@misc{WangPRISM25,
author      = { Ao Wang and 
                Yixin Chen and
                Aaron Hong and
                Adam Rivers and
                Alan Kuhnle and
                Christina Boucher},
title       = {Primer Design through Submodular Function Estimation},
note        = {In submission}
year        = {2025},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prism_bio-1.0.5.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prism_bio-1.0.5-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

Details for the file prism_bio-1.0.5.tar.gz.

File metadata

  • Download URL: prism_bio-1.0.5.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for prism_bio-1.0.5.tar.gz
Algorithm Hash digest
SHA256 a34fba83b7f6b6790bbbdc4b115621431a8125af119c0a39fcc64418c7fafb83
MD5 62dad054c3724733d86ae369c141eebf
BLAKE2b-256 bfa3c6a3e8d2d9ff5390d5dd11848a813e8f2a54fe482ed3c2442acc614cd1d0

See more details on using hashes here.

File details

Details for the file prism_bio-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: prism_bio-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 27.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for prism_bio-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2ef90d20d6eaa562d8bd9edcacdbe5ee4669de93ee19db3ef5323b8556a90e88
MD5 587ab3d5f1d6eb06e7eb3520932a4288
BLAKE2b-256 8ad775a3b8730a1f0513881c53d188d87147d061e912084edf35d5672c9b352d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page