Skip to content

Installing

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.

Docker

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.

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
cd 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.

Homebrew

Install Homebrew on macOS or Install Homebrew on Linux or Windows 10. Once Homebrew has been installed, run

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

Install 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., 11.0).

Other

Other ways of installing TACT, including unpacking the tarball somewhere or directly using pip, are neither supported nor recommended.


Last update: October 11, 2021