Skip to main content

Taxtastic is a python package used to build and maintain reference packages, i.e. collections of reference trees, reference alignments, profiles, and associated taxonomic information.

https://github.com/fhcrc/taxtastic/actions/workflows/unittests.yml/badge.svg

A script named taxit provides a command line interface:

% taxit -h
usage: taxit [-h] [-V] [-v] [-q]
             {help,add_nodes,add_to_taxtable,check,composition,create,extract_nodes,findcompany,get_descendants,get_lineage,info,lineage_table,lonelynodes,named,namelookup,new_database,refpkg_intersection,reroot,rollback,rollforward,rp,strip,taxids,taxtable,update,update_taxids}
             ...

Creation, validation, and modification of reference packages for use with
`pplacer` and related software.

positional arguments:
  {help,add_nodes,add_to_taxtable,check,composition,create,extract_nodes,findcompany,get_descendants,get_lineage,info,lineage_table,lonelynodes,named,namelookup,new_database,refpkg_intersection,reroot,rollback,rollforward,rp,strip,taxids,taxtable,update,update_taxids}
    help                Detailed help for actions using `help <action>`
    add_nodes           Add nodes and names to a database
    add_to_taxtable     Add nodes to an existing taxtable csv
    check               Validate a reference package
    composition         Show taxonomic composition of a reference package
    create              Create a reference package
    extract_nodes       Extract nodes from a given source in yaml format
    findcompany         Find company for lonely nodes
    get_descendants     Returns given taxids including descendant taxids
    get_lineage         Calculate the taxonomic lineage of a taxid
    info                Show information about reference packages.
    lineage_table       Create a table of lineages as taxonimic names for a
                        collection of sequences
    lonelynodes         Extracts tax ids of all lonely nodes in a taxtable
    named               Filters unclassified, unnamed taxonomy ids
    namelookup          Find primary name and tax_id from taxonomic names
    new_database        Download NCBI taxonomy and create a database
    refpkg_intersection
                        Find the intersection of a taxtable and a refpkg's
                        taxonomy.
    reroot              Taxonomically reroots a reference package
    rollback            Undo an operation performed on a refpkg
    rollforward         Restore a change to a refpkg immediately after being
                        reverted
    rp                  Resolve path; get the path to a file in the reference
                        package
    strip               Remove rollback and rollforward information from a
                        refpkg
    taxids              Convert a list of taxonomic names into a recursive
                        list of species
    taxtable            Create a tabular representation of taxonomic lineages
    update              Add or modify files or metadata in a refpkg
    update_taxids       Update obsolete tax_ids

options:
  -h, --help            show this help message and exit
  -V, --version         Print the version number and exit
  -v, --verbose         Increase verbosity of screen output (eg, -v is
                        verbose, -vv more so)
  -q, --quiet           Suppress output

Installation

taxtastic requires Python 3.8+. The simplest method of installing is from PyPi using uv:

uv tool install taxtastic

Or if you prefer to install from the git repository:

uv tool install git+https://github.com/fhcrc/taxtastic.git

Finally, taxit can be run from a Docker image hosted in the GitHub Container Registry. For example, to create a new sqlite database:

docker run --rm -it -v $(pwd):/opt/run --platform=linux/amd64 ghcr.io/fhcrc/taxtastic:latest taxit new_database ncbi_taxonomy.db

Note that initial database creation (at least on MacOS using amd64 emulation) is very slow using Docker and is not recommended.

A note on databases

This project supports both sqlite3 and postgresql as database backends. For most applications, we recommend sqlite3: some operations (particularly initial database creation) are much faster using sqlite3.

sqlite3

Taxtastic uses recursive common table expressions to query the taxonomy database, which requires that the Python sqlite3 module is built against sqlite3 library version of 3.8.3 or higher (http://www.sqlite.org/releaselog/3_8_3.html). You can check the version like this:

python3 -c 'import sqlite3; print(sqlite3.sqlite_version)'

postgresql

Despite some recent optimizations as of version v0.10 (in which indexes and constraints are dropped before creating the taxonomy database), operations in Postgres are somewhat slower. Note that the default Postgres configuration on MacOS is likely to be quite resource constrained; consider tuning your database configuration by consulting a site such as PGTune (https://pgtune.leopard.in.ua).

Building docs locally

To work on the Sphinx docs locally, first install taxtastic and then install the docs dependencies:

uv pip install -r docs/requirements.txt

From the repository root, build the docs once:

make -C docs/ html

Then start the live-reload server:

sphinx-autobuild docs docs/_build/html

This serves the docs locally and rebuilds the HTML output whenever the docs sources change.

Metadata

Release files for taxtastic 1.0.1

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

Source distribution (sdist)

Source distribution for taxtastic 1.0.1
File Size Uploaded
taxtastic-1.0.1.tar.gz 826.6 kB Details

Built distribution (wheel)

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

Total release size: 945.5 kB

Release files / taxtastic-1.0.1.tar.gz

Download URL taxtastic-1.0.1.tar.gz
Size 826.6 kB
Tags Source
SHA-256 checksum
How to use checksums
054e623875b522ad4305de0b22598c0c29f80321c6e985f852f3c0e7b19f3bd2
BLAKE2b-256 checksum
How to use checksums
d7fae91951c2da6986dbf8538c66923d70ea44ead67b1fdb1220cea6893d586f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 23, 2026.

Transparency log

Release files / taxtastic-1.0.1-py3-none-any.whl

Download URL taxtastic-1.0.1-py3-none-any.whl
Size 118.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8be347f4dff935e0acc06086fc90c3787a75f72b6eb949f975136ffa61b1906
BLAKE2b-256 checksum
How to use checksums
ead4068447ee89fbb6e67fce2dbb60af29998d5990cdac8544c5f066b2d47b8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.12.0

2 release files

0.11.1

1 release file

0.10.0

2 release files

0.9.3

2 release files

0.9.2

1 release file

0.9.1

2 release files

0.9.0

2 release files

0.8.11

1 release file

0.8.9

1 release file

0.8.5

1 release file

0.8.4

1 release file

0.8.3

2 release files

0.8.2

2 release files

0.8.1

1 release file

0.6.4

0.5.4

2 release files

0.5.3

2 release files

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.2

1 release file

0.3.1

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