Skip to main content

primer-finder

CI Coverage Latest release Bioconda PyPI Python 3.10+ License: MIT Documentation DOI

primer-finder finds the sequences that tell one group of genomes from another, so that a selective (q)PCR assay can be designed on them. Give it two folders of assembled genomes — the ones the assay should amplify (inclusion) and the ones it must not (exclusion) — and it reports the regions that every inclusion genome carries, that no exclusion genome carries, and whose differences are close enough together to sit in one primer or probe.

inclusion/ ──┐                                                        ┌─► final_kmers.fasta
             ├─► kmers ─► subtract ─► assemble ─► map ─────► blast ───┤   the candidate regions
exclusion/ ──┘   (KMC)     (KMC)     (SKESA or   (minimap2)  (every   │
                                      SPAdes)                genome)  └─► primer-finder design
                                                                          Primer3 + in silico PCR
                                                                          ─► assays.tsv

Quick start

conda create -n primer-finder -c conda-forge -c bioconda primer-finder
conda activate primer-finder

primer-finder -i inclusion/ -e exclusion/ -o results/

The bioconda package is awaiting review (bioconda-recipes#70034). Until it is merged, use pip install primer-finder in an environment that already holds KMC, SKESA or SPAdes, minimap2 and BLAST, or install from the source code with environment.yml, which brings them.

inclusion/ and exclusion/ hold one assembled genome per file (.fasta, .fna, .fa, gzipped or not; subfolders and symbolic links are followed). The answer is results/final_kmers.fasta: one record per candidate region, the specific bases in lower case and their positions in the header, the most promising first. results/run_info.json records the parameters, the genomes and the version of every program used.

To turn those regions into assays, with Primer3 and a check of what would actually make each one selective:

primer-finder design results/ -o assays/ --insilico-pcr /path/to/insilicoPCR-linux-x64

--insilico-pcr is optional and points at insilicoPCR, a separate program: given it, the designed assays are amplified in silico against both groups and each one is marked with whether it amplifies every inclusion genome and no exclusion genome.

Every oligo proposed satisfies Primer3's length, melting temperature and GC limits and folds or dimerises — with itself and with its partner — below 47 °C; and unless the request pinned a 3' end on a differing base, each primer carries a G or a C at that end. All of it is predicted for an ordinary TaqMan reaction whose salt, dNTP and oligo concentrations are options. So a doomed assay is never proposed. See Designing assays.

To install from the source code instead, see Installation.

Given the genomes of five Xylella fastidiosa subspecies, it reports the regions that four independently published subspecies-specific qPCR assays were designed on, three of them in the top five candidates — see Validation.

primer-finder only keeps perfect matches: a kmer must be in all the inclusion genomes with no mismatch, and in none of the exclusion genomes (-p/--min-inclusion relaxes the first half when some of the inclusion genomes are incomplete). It is therefore very sensitive to the quality of the assemblies and to how the genomes were assigned to the two groups. Curate the input genomes; genome_comparator helps with that.

To check an installation, run the bundled example (simulated genomes with a known answer, a few seconds). It is in the repository, not in the conda package:

curl -sL https://github.com/duceppemo/primer-finder/archive/refs/tags/v1.7.0.tar.gz | tar -xz --strip-components=1 primer-finder-1.7.0/example
bash example/run_example.sh

Ordering the assays

Once an assay has been designed from a candidate region and ordered, primer-finder idt turns the IDT order sheet into a fasta file of oligos, one record per primer and probe:

primer-finder idt order.xlsx assays.fasta my_target

Documentation

Everything else is in the wiki, whose sources are maintained in docs/wiki:

Page Contents
Installation conda, bioconda, from source, checking the installation
Usage inputs, every option, choosing the two groups, performance
Designing assays Primer3 on the regions, how assays are scored, in silico PCR
Methods what each step does, the filtering rules, limits
Outputs every file and field
Example the simulated dataset and its expected result
Validation finding published qPCR assays in public genomes: four Xylella subspecies, nine Listeria clonal complexes
FAQ troubleshooting, "no contig passed"
Development tests, continuous integration, releases

Citation

If primer-finder helped your work, please cite it — doi:10.5281/zenodo.23226411, which always resolves to the latest version (see CITATION.cff) — together with the programs it runs: KMC, SKESA or SPAdes, minimap2, BLAST and, for the design step, Primer3 and insilicoPCR.

License

MIT

Metadata

Release files for primer-finder 1.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for primer-finder 1.7.0
File Size Uploaded
primer_finder-1.7.0.tar.gz 103.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for primer-finder 1.7.0
File Interpreter ABI Platform
primer_finder-1.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 167.1 kB

Release files / primer_finder-1.7.0.tar.gz

Download URL primer_finder-1.7.0.tar.gz
Size 103.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6d864a6fd7e66f26c54c017d83db47f0e59dc1401dc6225952f3aa60498dfc5d
BLAKE2b-256 checksum
How to use checksums
fcbd766ce38124918055a1d89c24a8cae3ba15ea403bf6a324ec7ae65cdac566
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / primer_finder-1.7.0-py3-none-any.whl

Download URL primer_finder-1.7.0-py3-none-any.whl
Size 63.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6c8307c72e243b440a765b99d59e3567d3ac5d013796e1676b5f8a7fcbb0f8c
BLAKE2b-256 checksum
How to use checksums
7dd09069bd69e35be665b058adaebc02e3372c40771974395b17e96aefb6647a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release history Release notifications | RSS feed

1.8.1

2 release files

1.8.0

2 release files

This release

1.7.0 This release

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page