In silico optimization for multiplex PCR primer design for targeted sequencing applications
Project description
multiplex_wormhole
In silico optimization for multiplex PCR assays that minimized predicted primer dimer loads. The pipeline was developed for genotyping by amplicon sequencing (i.e., reduced SNP panel) applications, however, the process is transferable to any multiplex PCR targeted sequencing approach. The impetus for multiplex_wormhole was genotyping noninvasive wildlife genetic samples. Default primer design settings are therefore conservative and tailored towards amplifying low concentration and degraded DNA such as that found in fecal and hair samples.
Full documentation: https://mhallerud.github.io/multiplex_wormhole
Installation
Set up a virtual environment
multiplex_wormhole was built and tested on MacOS with Python v3.9.13 in the Spyder IDE managed under Anaconda-Navigator. For those new to Python or with existing python packages, Anaconda is the recommended virtual environment manager. For a conda virtual environment within your working directory:
conda create -n py39 python=3.9 #create new virtual env w/ python v3.9
conda activate py39 #enter virtual env
Some clusters used pixi instead of conda environments:
pixi init #initialize virtual env
pixi add "python=3.9" #set python version
pixi shell #enter virtual env
Install multiplex wormhole
pip install multiplex_wormhole
Note: Pixi/conda can be finicky... Dependening on your system, you may run into dependency errors here. If that happens, exit your virtual env and install the missing dependencies following the instructions below.
Back-up installation option
If pip install doesn't work, you can also install manually by taking the following steps (from the command line):
# clone GitHub repo
git clone https://github.com/mhallerud/multiplex_wormhole
# install dependencies
pip install -r multiplex_wormhole/requirements.txt
# install as python package
pip install -e multiplex_wormhole
# check
multiplex-wormhole -h
Configuring the MFE primer binary
MFEprimer is used for dimer calculations. Multiplex wormhole is set up to automatically download and configure the binary file using the helpers/setup_mfeprimer.py script, take the following steps: Download the MFEprimer v3.2.7 version that fits your operating system here. Save the file to your multiplex_wormhole package directory (location can be found by running pip show multiplex_wormhole). Unzip the download (if zipped). Ensure the file can be executed by opening terminal or the command line in this directory and running chmod +x mfeprimer*.
Now you are ready to run multiplex wormhole!
Quick Start
Command line syntax
# PANEL DESIGN
# usage: multiplex-wormhole [-h] -t TEMPLATES -n NLOCI -o OUTDIR [-p PREFIX]
# [-k KEEPLIST] [-r RUNS] [-i ITER] [-c CYCLES]
# [-s SIMPLE] [-d] [-v]
# example for standard optimization with defaults:
python3.9 multiplexWormhole.py -t "Input_Templates.csv" -n 20 -o "Test_MW" -p "Test_MW_default" -k "Keeplist.fa"
# PANEL ASSESSMENT
# usage: mw-assess-panel [-h] -i INPUT [-a ALLDIMERS_DG] [-e ENDDIMERS_DG] [-b BADDIMERS_DG]
# example with defaults:
mw-assess-panel -i "Primers.fasta" -a -8 -e -5 -b -10
Python syntax
# load module
import multiplex_wormhole as mw
# panel design example (showing defaults)
mw.multiplexWormhole(TEMPLATES="Input_Templates.csv",
N_LOCI=50,
OUTDIR="Test_MW",
PREFIX="Test_MW_default",
KEEPLIST_FA="Keeplist.fa",
N_RUNS=10, ITERATIONS=1000, CYCLES=10, SIMPLE=5000, deltaG=False, VERBOSE=False)#optional
# panel assessment example (showing defaults)
mw.assessPanel(PRIMERS,
ALL_DIMERS_dG=-8, END_DIMERS_dG=-4, BAD_DIMERS_dG=-10) #optional
Arguments
multiplex-wormhole
TEMPLATES (-t –templates) : Path to templates CSV. NLOCI (-n –nloci) : Final panel size (i.e., # primer pairs & # templates amplified).
OUTDIR (-o –outdir) : Filepath where output directory will be created and all outputs saved within a generated folder structure.
PREFIX (-p –prefix) : Prefix for all outputs. [Defaults to a timestamp if None provided]
KEEPLIST_FA (-k –keeplist) : Path to keeplist FASTA. [Default: None]
N_RUNS (-r –runs) : Number of optimization runs. [Default: 10]
ITERATIONS (-i –iter) : Number of simulated annealing iterations per cycle. [Default: 1000]
CYCLES (-c –cycles) : Number of simulated annealing cycles per run. [Default: 10]
SIMPLE (-s –simple) : Number of simple iterative improvement iterations per run. [Default: 5000]
deltaG (-d –deltaG) : Optimize for mean overall deltaG of dimers [True] or total dimer tally [False]? [Default: False]
VERBOSE (-v –verbose) : Print all steps and swaps at the optimization step. [Default: False]
mw-assess-panel
PRIMERS (-i –input) : FASTA or CSV of primers. Sequence names must match the format .<#>.<FWD/REV> e.g., MACA01.0.FWD and MACA01.0.REV. If a CSV is provided, it must include 'PrimerID' and 'Sequence' fieldnames.
ALL_DIMERS_dG (-a --alldimers_dg) : Lower Gibbs free energy (deltaG) threshold for predicting non-end dimers. [Default: -8]
END_DIMERS_dG (-e --enddimers_dg) : deltaG threshold for predicting 3' end dimers. [Default: -4]
BAD_DIMERS_dG (-b --baddimers_dg) : deltaG threshold for counting dimers as particularly "bad". [Default: -10]
multiplex-wormhole is a wrapper around the steps described below and uses their defaults. See the multiplex_wormhole page to understand the pipeline steps and output structure.
Full Workflow Example
See multiplex_primer_design to run the full pipeline step by step using the example templates.
Comments/Questions/Ideas
Please report any problems, questions, or potential enhancements in the GitHub Issues page.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file multiplex_wormhole-1.0.5.tar.gz.
File metadata
- Download URL: multiplex_wormhole-1.0.5.tar.gz
- Upload date:
- Size: 63.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6b6f5183a212f9fc9e0042f48a6d6f9f23d5de28c8a7e2c2414f5efc8dfa48c
|
|
| MD5 |
72c34f3abb9cbe4069480cd3b350de25
|
|
| BLAKE2b-256 |
dcc8b1353c6437b09db28d77dfb54a4f90cbdcacce456abbd2841519a330ad63
|
Provenance
The following attestation bundles were made for multiplex_wormhole-1.0.5.tar.gz:
Publisher:
release.yml on mhallerud/multiplex_wormhole
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
multiplex_wormhole-1.0.5.tar.gz -
Subject digest:
a6b6f5183a212f9fc9e0042f48a6d6f9f23d5de28c8a7e2c2414f5efc8dfa48c - Sigstore transparency entry: 2064017828
- Sigstore integration time:
-
Permalink:
mhallerud/multiplex_wormhole@b4913b44b832ea74ee4ff34b0789529fa533673b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mhallerud
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b4913b44b832ea74ee4ff34b0789529fa533673b -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file multiplex_wormhole-1.0.5-py3-none-any.whl.
File metadata
- Download URL: multiplex_wormhole-1.0.5-py3-none-any.whl
- Upload date:
- Size: 69.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cf5921d21a36465ab35868727d870bb1b4bf3ef0b83881d01d3fefe6fbbe9af
|
|
| MD5 |
ea241c9845f5a009cd68ec22763368bf
|
|
| BLAKE2b-256 |
9a6357263a91f152912798041d49f40c438a3e24be4d4cc093e892e110e90ddb
|
Provenance
The following attestation bundles were made for multiplex_wormhole-1.0.5-py3-none-any.whl:
Publisher:
release.yml on mhallerud/multiplex_wormhole
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
multiplex_wormhole-1.0.5-py3-none-any.whl -
Subject digest:
2cf5921d21a36465ab35868727d870bb1b4bf3ef0b83881d01d3fefe6fbbe9af - Sigstore transparency entry: 2064017844
- Sigstore integration time:
-
Permalink:
mhallerud/multiplex_wormhole@b4913b44b832ea74ee4ff34b0789529fa533673b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mhallerud
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b4913b44b832ea74ee4ff34b0789529fa533673b -
Trigger Event:
workflow_dispatch
-
Statement type: