Installation
Set up a Python environment (e.g. with
virtualenvorconda) with Python 3.9 or later (3.12 recommended)Clone and navigate to the repository:
git clone https://github.com/christiaanjs/treeflow.gitthencd treeflowInstall the Python package:
pip install .To run the example notebooks:
pip install ".[examples]"
Run TreeFlow
To run Jupyter Lab
jupyter labFollow the link that appears to Jupyter (
http://127.0.0.1:8888/lab?token=...)
Run one of TreeFlow’s command line applications
Docker
Install Docker following the official instructions
Clone and navigate to the repository:
git clone https://github.com/christiaanjs/treeflow.gitthencd treeflowBuild the container:
docker build -t treeflow .Run TreeFlow
To run Jupyter Lab:
docker run -p 8888:8888 treeflowTo use a different port (e.g. 8999) use
docker run -p 8999:8888 treeflowIf you need to access a local directory (e.g. for input and output files) mount it into the docker image:
docker run -v /home/dev/repo/data:/app/data treeflowto mount the directory/home/dev/repo/datato thedatadirectory in the notebook (both must be absolute paths, and/appis the working directory in the container)If you need to save output to the mounted directory you’ll need to give the Docker user (ID 10001) permissions:
mkdir /home/dev/repo/data/outthensudo chown -R 10001:10001 /home/dev/repo/data/out
Follow the link that appears to Jupyter (
http://127.0.0.1:8888/lab?token=...), changing the port if necessaryTo stop the process, use
docker kill {container}(you can usedocker psto lookup the ID)On Linux
docker ps | grep treeflow | awk '{print $1}' | xargs docker killwill stop all TreeFlow containers
To run one of TreeFlow’s command line applications:
docker run treeflow {command}You may want to mount a data directory for input/output e.g.
docker run -v /home/dev/repo/data:/app/data treeflow_vi -i data/alignment.fasta -t data/topology.nwk --tree-samples-output data/tree-results.nexus