Skip to content

Installing TreeSAPP

Connor Morgan-Lang edited this page Nov 2, 2021 · 10 revisions

Conda

TreeSAPP and most of its dependencies can be installed in its own environment using conda.

conda create -n treesapp_cenv -c bioconda -c conda-forge treesapp
conda activate treesapp_cenv

If you plan on building your own reference packages with treesapp create and would like to use the '--outdet_align' flag to remove sequence outliers from the MSA, you will also need to install OD-Seq. This option isn't required though!

Docker

We have a Docker container that's available for download from Quay.io

docker pull quay.io/hallamlab/treesapp
docker run -itd quay.io/hallamlab/treesapp:latest

In most, if not all, cases you'll need to bind some part of your local system to make it accessible to the docker container. Otherwise, TreeSAPP will not be able to read the inputs you provide it or write the outputs to your local storage. You can get the gist of what is required from the official docker documentation on adding bind mounts, volumes or memory filesystems.

Here's what has worked for me so far. In this example I bounnd my ~/Desktop directory to make it accessible to the docker container

docker run -t -i -d --mount type=bind,src=/home/cmorganl/Desktop,dst=/home/cmorganl/Desktop quay.io/hallamlab/treesapp:latest

To run a command, such as treesapp, you'll use docker exec $name treesapp where '$name' refers to the container's unique name on the system. This name can be gathered by running docker ps. In the following command I'm using treesapp assign to classify some sequences with up to four threads.

docker exec charming_benz treesapp assign -i /home/cmorganl/Desktop/input.fasta -o /home/cmorganl/Desktop/output_test/ -n 4

Singularity

If you're working in an HPC environment and don't have conda installed, we also have a singularity container available:

singularity pull library://cmorganl/default/treesapp
singularity exec treesapp.sif treesapp

PyPI

The most recent version of TreeSAPP is hosted on the Python Package Index (PyPI) and can be installed using pip install treesapp. Alternatively you can install the latest development version of TreeSAPP locally with git clone. In either case we recommend installing within a virtual environment using the python package virtualenv.

cd ~/bin
virtualenv ~/bin/treesapp_venv
source ~/bin/treesapp_venv/bin/activate
pip install treesapp

System requirements:

TreeSAPP requires any Python versions 3.6, 3.7 and 3.8. Python 2.x isn't supported and never will be, sorry for any inconvenience.

If you opted to install TreeSAPP either using pip or by cloning the development version from GitHub you will need to install dependencies that you do not already have installed (i.e. they will need to be in you're environment's path).

Clone this wiki locally