Skip to content

PathoGenOmics-Lab/pathotypr

Repository files navigation

pathotypr logo

Documentation License: AGPL v3 Bioconda Bioconda downloads Preprint Markers

Lineage classification and marker-driven genotyping — from assemblies or raw reads.

Tutorials, every command option, input formats, output columns and benchmarks.

Paula Ruiz-Rodriguez1 and Mireia Coscolla1
1. Institute for Integrative Systems Biology, I2SysBio, University of Valencia-CSIC, Valencia, Spain


What is pathotypr?

pathotypr is a Rust toolkit that classifies microbial genomes into lineages and genotypes them against user-defined marker panels. It works with both assembled genomes (FASTA) and raw sequencing reads (FASTQ), runs on a single laptop, and ships with a native desktop GUI.

pathotypr workflow schema

Command What it does Input Guide
train Build a Random Forest classifier from labeled genomes FASTA docs
predict Assign lineages using a trained model FASTA + model docs
classify Call known SNP markers in assemblies FASTA + markers docs
split-fastq Alignment-free genotyping from reads FASTQ + markers docs
match Find the closest reference genome FASTQ + references docs

Note

Nothing is hard-coded to one organism: the marker panel you supply defines what is typed. In practice pathotypr has only been validated on the M. tuberculosis complex, so treat other organisms as exploratory and check them against a truth set you trust.

Install

Command line

conda create -n pathotypr -c bioconda pathotypr
conda activate pathotypr
pathotypr --help

Desktop app: download an installer for macOS, Linux or Windows. No compiler needed.

Building from source, system dependencies and the first-launch notes for unsigned apps are in the installation guide.

Quick start

# Genotype an assembly against a marker panel
pathotypr classify -m markers.tsv -r reference.fasta -i sample.fasta -o results

# Genotype straight from reads
pathotypr split-fastq -m markers.tsv -r reference.fasta \
  -i reads_R1.fastq.gz -i reads_R2.fastq.gz -o genotype

# Train a model, then apply it
pathotypr train   -i labeled_genomes.fasta -o model.pathotypr.zst
pathotypr predict -i query.fasta -m model.pathotypr.zst -o predictions.tsv

Add --excel to any command to also write .xlsx. The getting started tutorial walks through a full MTBC run, from install to reading the output.

Ready-to-use MTBC data

Marker panels and a pre-trained model for the M. tuberculosis complex are published on Zenodo, DOI 10.5281/zenodo.19210044:

File Contents
pathotypr_lineage_markers_v1.0.0.tsv 3,707 lineage SNPs (L1–L10, A1–A4)
pathotypr_dr_markers_v1.0.0.tsv 102,213 DR mutations (WHO catalogue v2, 2023)
pathotypr_rf_model_v1.0.0.pathotypr Pre-trained Random Forest (k=31, 100 trees)

Download links and usage are in the installation guide.

Documentation

Everything lives at pathogenomics-lab.github.io/pathotypr:

Getting started End-to-end MTBC tutorial
Input formats What every file must look like, per command
Marker format Curating your own panel
Output files Every column of every file
Desktop GUI The app, and building it
Algorithms How each module works
Benchmarks Speed, memory and tool comparison
FAQ Common problems

Citation

If you use pathotypr, please cite:

Ruiz-Rodriguez P, Coscollá M. Pathotypr: harmonised MTBC lineage assignment and resistance-associated variant detection for genomic surveillance. bioRxiv (2026). doi: 10.64898/2026.03.24.714002

BibTeX, RIS and APA entries, plus the software DOI, are on the citation page.

License

GNU Affero General Public License v3.0


pathotypr is developed with ❤️ by:

Paula Ruiz-Rodriguez

💻 🔬 🤔 🔣 🎨 🔧

Mireia Coscolla

🔍 🤔 🧑‍🏫 🔬 📓

This project follows the all-contributors specification (emoji key).

Releases

Packages

Contributors

Languages