Skip to main content

Taxonova

License: MIT PyPI Python 3.8+ Web server

Taxonova is a deep learning classifier for the taxonomic assignment of microbial ribosomal RNA amplicon sequences, from single variable regions of the 16S rRNA gene to the full rRNA operon. For each sequence it reports a lineage from domain to species together with a confidence at each rank. When the confidence at a rank is below its threshold, Taxonova reports the lineage only down to the rank above, for example a genus without a species, rather than assigning an unsupported label. The thresholds therefore set the balance between assigning more sequences and making fewer incorrect assignments.

Species names follow the Genome Taxonomy Database (GTDB): the 16S rRNA models are trained on Greengenes2, which takes its nomenclature from GTDB, and the full-operon model on GROND with GTDB taxonomy.

Web server

The simplest way to use Taxonova is the web server, which needs no installation:

https://huggingface.co/spaces/claessonlab/Taxonova

Upload a FASTA file or paste sequences, select the amplicon region and, if needed, a confidence threshold. The web server screens each sequence with an rRNA gene filter before classification and returns the same results as the command-line tool. For large datasets, or to train a model on your own reference, install the package as described below.

Performance

In the accompanying manuscript, evaluated on physical and biome-simulated mock communities against seven published classifiers, Taxonova reached species-level F-measures of 0.76 to 1.00 (median 0.94) on short-read and 0.82 to 0.99 (median 0.97) on long-read amplicons of 250 bp to 4,900 bp. Those figures were obtained with the v1.0.0 checkpoints and the original Taxobench scoring rules. With the 26.10.0 checkpoints and the documented thresholds, median species-level F-measures over the 13 mock communities per region are 0.836 to 0.961 at 0.5/0.7 (CHANGELOG.md). It classifies about 100 sequences per second on a single CPU core with a peak memory use of 0.82 GB; no GPU is used for classification.

Installation

pip install taxonova

or, from this repository:

git clone https://github.com/kardokhk/taxonova.git
cd taxonova
pip install -e .

Pretrained models

Model file Region Reference
gg2_v4_mrgroups_model_26.10.pt V4 Greengenes2
gg2_v3v4_mrgroups_model_26.10.pt V3-V4 Greengenes2
gg2_v5v7_mrgroups_model_26.10.pt V5-V7 Greengenes2
gg2_v1v9_mrgroups_model_26.10.pt whole 16S (V1-V9) Greengenes2
gtdb_rrn_mrgroups_model.pt full rRNA operon (16S-ITS-23S) GROND, GTDB taxonomy

The checkpoints (about 240 MB each) are attached to the GitHub releases (Greengenes2: v26.10.0; RRN: v1.0.0) and can be downloaded with the built-in tool:

taxonova download-models --list            # available and downloaded models
taxonova download-models --models gg2_v4   # one model; keys: gg2_v4, gg2_v3v4, gg2_v5v7, gg2_v1v9, gtdb_rrn
taxonova download-models --models all      # all five

Models are stored in ~/.taxonova/models/, or in the directory given by the TAXONOVA_MODELS_DIR environment variable, and can then be referred to by file name. The downloader verifies each file's checksums.

Upgrading from 26.9.x or earlier: releases 1.0.0 to 26.9.2 applied no confidence thresholds to the Greengenes2 checkpoints, and 26.10.0 replaces those checkpoints. Download the new ones and rerun earlier Greengenes2 analyses; see CHANGELOG.md for how output changes and MODELS.md for how the checkpoints were made.

Usage

taxonova classification \
    --input reads.fasta \
    --model_input gg2_v4_mrgroups_model_26.10.pt \
    --output predictions.tsv
Option Meaning
--input query sequences in FASTA format
--model_input pretrained checkpoint (path or file name)
--output output table (TSV)
--confidence_threshold species threshold, default 0.8; the thresholds of the other ranks scale with it
--domain_threshold ... --genus_threshold set the threshold of a single rank explicitly
--cpu_threads number of CPU threads

The default thresholds are 0.5 for domain to family, 0.7 for genus and 0.8 for species. Because the same threshold does not give the same abstention rate in every amplicon region or with every reference, we recommend choosing the threshold that gives the abstention rate a study requires on a held-out subset of the reference.

The output table has one row per sequence: sequence_id, then a label and a confidence for each of the seven ranks. The confidence at each rank is capped at that of the rank above. A rank whose confidence is below its threshold, and every rank below it, is reported as Unclassified.

Other modes are training (train a model on your own reference; --smart_full_data selects the number of epochs on a validation split and then retrains on all sequences), calibrate (temperature scaling) and fit-ood (out-of-distribution threshold). Run taxonova <mode> --help for all options, and see QUICKSTART.md for a short worked example.

Benchmark

The evaluation framework used in the manuscript, Taxobench, is available at https://github.com/kardokhk/TaxoBench.

Citation

Kakabra K, Patel S, Temko A, Claesson MJ. Taxonova: deep learning enables fast and confidence-aware microbiome species-level amplicon classification. PLoS Comput Biol. 2026. doi:10.1371/journal.pcbi.1014912 (accepted; volume and pages on publication).

License

MIT; see LICENSE.

Contact

Kardokh Kakabra, kardokhkaka@gmail.com. Developed in the Claesson Lab, University College Cork and APC Microbiome Ireland.

Metadata

Release files for taxonova 26.10.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 taxonova 26.10.0
File Size Uploaded Provenance Actions
taxonova-26.10.0.tar.gz 135.8 kB Without provenance Details for taxonova-26.10.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for taxonova 26.10.0
File Interpreter ABI Platform Actions
taxonova-26.10.0-py3-none-any.whl Python 3 none any Details for taxonova-26.10.0-py3-none-any.whl

Total release size: 227.2 kB

Release files / taxonova-26.10.0.tar.gz

Download URL taxonova-26.10.0.tar.gz
Size 135.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6da28b8103ff8d4a878b1d649b2d6f73fb5d4322c90533bce8f2f3023330ae70
BLAKE2b-256 checksum
How to use checksums
b7ceed125a393442546bce371b4f6da43c9e44dd2b69e1dea5bc867d6ebb0452
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / taxonova-26.10.0-py3-none-any.whl

Download URL taxonova-26.10.0-py3-none-any.whl
Size 91.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
259cee4a4a623e0ab095e9bcbc71b096310a70e46247acc9fea9c78299b9dc56
BLAKE2b-256 checksum
How to use checksums
85f809ee0e1c4eea86562c630ffb131d2b4292ead68ce63d17f3797755713a9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Security for taxonova 26.10.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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