Evaluate primer performance against FASTA databases with mismatch-aware matching and flexible logical detection rules.
- PrimerMancer.py – Core script
- PrimerMancer.ipynb – Jupyter Lab version (how I use it)
- LICENSE – Licensing information
- README.md – This file
-
IUPAC-aware primer matching
Detects primer hits allowing ambiguity codes and a configurable number of mismatches. -
Automatic reverse-complementing
Primers whose names end withrevare automatically reverse-complemented. -
Flexible detection logic
Combine primers using boolean expressions, for example:(qmcraF1 or qmcraF3) and mcrA_rev -
Taxonomy-aware reporting
Aggregates detection percentages by the selected taxonomic rank (e.g., phylum, class). -
Optional downsampling
Randomly subsample large taxa to accelerate analysis and ensure reproducibility. -
CSV output
Produces a clean, wide-format table summarizing detection per taxon, rule, and mismatch level.
PrimerMancer is written for use in Jupyter Lab, but all core logic is provided in a standalone .py script
- Prepare a FASTA file where taxonomic ranks in the header are separated by semicolons. e.g.:
>Archaea;Euryarchaeota;Methanomicrobia;Methanosarcinales;Methanosarcinaceae;Methanosarcina;Methanosarcina horonobensis cttcatctccgcatacgcaatgtgcgccggtgaagcagcagtcgctgacctgtccttcgctgcaaagcacgcagcccttgtctcaatgggtgaaatgctt... - Define primers (5'→3'); include
"rev"in the primer name to auto-reverse-complement it. - Specify detection rules using Python-style boolean logic.
- Run the script or notebook to compute primer detection rates under increasing mismatch allowances.
- Exported output (
custom_primer_test.csv) summarizes detection percentages across taxa, rules, and mismatch levels.
PrimerMancer is released under a BSD-3-Clause license.
See the LICENSE file for more details.