This repository contains the Python implementation of the Centroid algorithm and a script to generate simulated datasets and recreate plots from the paper.
The simulation part is separated, whereas the Centroid algorithm is part of the python package called tetres
.
ℹ️ New version available |
---|
Check out the more recent version of this package at https://github.com/bioDS/tetres |
The package has a documentation included as html{pdf}
, see tetres/docs/build/html{latex}/index.html{tetres.pdf}
.
The simulation script contains comments and the functions should be self-explanatory.
Before using the package the c code contained in /tetres/tetres/trees/
has to be manually compiled by running make
.
After that install the python package to your Python environment using the pip install -e '/path/to/repo/tetres/'
.
Some functions use R and the following packages should be installed:
beautier, ape, phangorn, phytools
BEAST2.6 (this is because of the R package beautier) needs to be installed to run the Simulations from simulationGenerator.py
.
You will also need to set the path to BEAST2 and to treeannotator in the script simulationGenerator.py
line 25 and 27.
For the error measure plot recreation the following python packages need to be installed
Biopython, scipy, seaborn, pandas, multipledispatch
Check out the example folder /example/
if you want to run the centroid algorithm on your own data
If you publish a paper using this software, please cite
Lars Berling, Lena Collienne, and Alex Gavryushkin
Estimating the mean in the space of ranked phylogenetic trees
bioRxiv 2023
https://doi.org/10.1101/2023.05.08.539790