Skip to content

About

Mismatch-aware primer evaluation with flexible detection rules and taxonomy-based reporting.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🔮 PrimerMancer

Evaluate primer performance against FASTA databases with mismatch-aware matching and flexible logical detection rules.


📂 Contents

  • PrimerMancer.py – Core script
  • PrimerMancer.ipynb – Jupyter Lab version (how I use it)
  • LICENSE – Licensing information
  • README.md – This file

✨ Features

  • IUPAC-aware primer matching
    Detects primer hits allowing ambiguity codes and a configurable number of mismatches.

  • Automatic reverse-complementing
    Primers whose names end with rev are 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.


🛠️ Usage

PrimerMancer is written for use in Jupyter Lab, but all core logic is provided in a standalone .py script

Basic workflow

  1. 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...
  2. Define primers (5'→3'); include "rev" in the primer name to auto-reverse-complement it.
  3. Specify detection rules using Python-style boolean logic.
  4. Run the script or notebook to compute primer detection rates under increasing mismatch allowances.
  5. Exported output (custom_primer_test.csv) summarizes detection percentages across taxa, rules, and mismatch levels.

📜 License

PrimerMancer is released under a BSD-3-Clause license.
See the LICENSE file for more details.

About

Mismatch-aware primer evaluation with flexible detection rules and taxonomy-based reporting.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages