TACT requires Python 3. When possible, I recommend using the PyPy 3 implementation as it can significantly speed up TACT analyses, particularly on large datasets. In addition, TACT depends on the click, DendroPy, NumPy, and SciPy packages.
If you can use Docker, this is the recommended method as it is both convenient to install and fast for large datasets thanks to PyPy. Note that Docker images are only provided for x86_64 processors (
amd64). Docker images are not automatically built for ARM processors and must either be built manually, or consider installing TACT with one of the other options below.
Install Docker Desktop and run the following to download the TACT image:
docker pull jonchang/tact:latest
Then, run TACT from the container image, giving it access to your current working directory:
mkdir -p examples
curl -LO https://raw.githubusercontent.com/jonchang/tact/HEAD/examples/Carangaria.csv
curl -LO https://raw.githubusercontent.com/jonchang/tact/HEAD/examples/Carangaria.tre
docker run -it -v "$(pwd)":/workdir -w /workdir jonchang/tact tact_build_taxonomic_tree Carangaria.csv --output Carangaria.taxonomy.tre
docker run -it -v "$(pwd)":/workdir -w /workdir jonchang/tact tact_add_taxa --backbone Carangaria.tre --taxonomy Carangaria.taxonomy.tre --output Carangaria.tacted
Here's a screencast of how to use the Docker commands:
The above Docker image defaults to the latest tagged release. In the rare case you need to use a different version, a full list of tags is available on Docker Hub.
brew install jonchang/biology/tact
This is easy to install if you don't have Docker access, but for large datasets, this can be as much as five times slower.
pipx, then run:
pipx install tact
If you have PyPy3 installed, you can try to install a faster version using:
pipx install --python pypy3 tact
Note that this will take much longer to install and could fail if the proper dependencies (mainly openblas) aren't set up. On macOS, you'll need to run
brew install openblas gcc pypy3 pipx, force-link
openblas, and set the
MACOSX_DEPLOYMENT_TARGET environment variable to your macOS version (e.g.,
Other ways of installing TACT, including unpacking the tarball somewhere or directly using
pip, are neither supported nor recommended.