TreeTime provides routines for ancestral sequence reconstruction and the inference of molecular-clock phylogenies, i.e., a tree where all branches are scaled such that the locations of terminal nodes correspond to their sampling times and internal nodes are placed at the most likely time of divergence.
TreeTime is implemented in Python 2.7 -- an experimental port to [Python 3 is available in a separate branch](https://github.com/neherlab/treetime/tree/py3).
TreeTime aims at striking a compromise between sophisticated probabilistic models of evolution and fast heuristics. It implements GTR models of ancestral inference and branch length optimization, but takes the tree topology as given.
To optimize the likelihood of time-scaled phylogenies, TreeTime uses an iterative approach that first infers ancestral sequences given the branch length of the tree, then optimizes the positions of unconstrained nodes on the time axis, and then repeats this cycle.
The only topology optimization are (optional) resolution of polytomies in a way that is most (approximately) consistent with the sampling time constraints on the tree.
@@ -34,22 +33,22 @@ The package is designed to be used as a stand-alone tool or as a library used in
### Installation and prerequisites
TreeTime is written in Python 2.7 and currently doesn't support Python 3.
* The package depends on several python libraries:
- numpy, scipy: for all kind of mathematical operations as matrix operations, numerical integration, interpolation, minimization, etc.
- BioPython: for parsing multiple sequence alignments and all phylogenetic functionality
TreeTime is compatible with Python 2.7 upwards and is tested on 2.7, 3.5, and 3.6. It depends on several Python libraries:
- matplotlib: optional dependency for plotting
If you do not have these libraries, you can install them by typing in the terminal:
```bash
$pipinstall numpy scipy biopython matplotlib
```
* numpy, scipy, pandas: for all kind of mathematical operations as matrix
operations, numerical integration, interpolation, minimization, etc.
* To install the package, run `setup.py` script from the terminal:
```bash
$python setup.py install
```
* BioPython: for parsing multiple sequence alignments and all phylogenetic
functionality
* matplotlib: optional dependency for plotting
You may install TreeTime and its dependencies by running
pip install .
within this repository.
You might need root privileges for system wide installation. Alternatively, you can simply use it TreeTime locally without installation. In this case, just download and unpack it, and then add the TreeTime folder to your $PYTHONPATH.