Skip to content

omnitax

Biological taxonomies (NCBI, GTDB and a few more) as Python objects, in one SQLite file or behind a small server, with a benchmarked way to translate between NCBI and GTDB.

Please read first

omnitax was written with LLM coding agents and reviewed by a human. It is largely untested in practice: it has one real user so far (sylphd). APIs may change before 1.0. It runs on Linux only for now. Check results on your own data before you rely on them.

import omnitax

ncbi = omnitax.open("taxonomies.sqlite", "ncbi")
gtdb = omnitax.open("taxonomies.sqlite", "gtdb:232")

ncbi["562"].lineage_string()               # d__Bacteria;p__Pseudomonadota;...;s__Escherichia coli
gtdb.translate("g__Escherichia", ncbi)     # the NCBI node that holds the same genomes

Goals

  1. Many taxonomies, handled the same way: download, parse, one set of Python objects, conversion, export to standard formats. "All taxonomies" is not the aim; the common ones for microbiome work, and a pattern to add more, is.
  2. One API, several backends: a SQLite file, or a server on a Unix socket or HTTP, with the same answers.
  3. Benchmarked translation between taxonomies, with the method and results published. NCBI ↔ GTDB first.
  4. Taxonomies you can change: your own taxa as a small set of files that is applied again to every new release.
  5. Reproducibility: dated, checksummed snapshots of several taxonomies and versions in one file.

What works today

  • Taxonomies. NCBI (the current dump, or any monthly archive since 2018-12), GTDB releases 80 to 232, SILVA, Greengenes2, Open Tree, custom tables, and taxdump files (gtdb-taxdump, ictv-taxdump, TaxonKit output). SILVA, Greengenes2 and Open Tree load the real files but have had little more checking than that.
  • Questions. Lineages with rank slots, LCA, consensus, exact and fuzzy name search, subsets, edits, export as a taxdump or a table.
  • Translation. NCBI ↔ GTDB through shared genome accessions. Only GTDB 232 → NCBI has been measured. See Translation between taxonomies.
  • Edits that survive updates. Your own taxa as an overlay.
  • Backends. A file, a server with a documented HTTP API, and a command line.

What does not work yet

SILVA, Greengenes2 and Open Tree cannot be translated to anything, because no loader makes links for them. Not supported: native ICTV, GBIF, Catalogue of Life, UNITE, PR2, LTP, RDP, BOLD. Export is a taxdump or a table; there is no Newick or QIIME-style output. Linux only. The roadmap lists what is planned.

Where to go next

  • Install and the Quick start.
  • How omnitax differs from TaxonKit, ETE, taxopy, multitax, gtdb-taxdump, gtdb_to_taxdump and get-tax-info. Some of them are the better choice for some jobs.
  • Design: how the layers fit together.

Where it comes from

omnitax began as the NCBI taxonomy code of sylphd and grew into a library. It owes a lot to others:

  • multitax (MIT): the source URLs and file formats, and the inspiration.
  • get-tax-info: an earlier tool that loads NCBI's taxdump into SQLite.
  • TaxonKit (MIT): the recipe for taxids of taxonomies that have none.
  • gtdb-taxdump: the published taxdumps that omnitax's output is checked against.