# TreeTime: time-tree and ancestral sequence inference

TreeTime provides routines for ancestral sequence reconstruction and inference of molecular-clock phylogenies, i.e., a tree where all branches are scaled such that the positions of terminal nodes correspond to their sampling times and internal nodes are placed at the most likely time of divergence.

To optimize the likelihood of time-scaled phylogenies, TreeTime uses an iterative approach that first optimizes branch lengths of the tree given the sequence data and date constraints, and then optimizes coalescent tree priors, relaxed clock parameters, or resolves polytomies. This cycle is repeated a few times. 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.

The code is hosted on github.com/neherlab/treetime.

## Features

ancestral sequence reconstruction (marginal and joint maximum likelihood)

molecular clock tree inference (marginal and joint maximum likelihood)

inference of GTR models

rerooting to maximize temporal signal and optimize the root-to-tip distance vs time relationship

simple phylodynamic analysis such as coalescent model fits

## Developer info

Source code on github at https://github.com/neherlab/treetime

Copyright and License: Pavel Sagulenko, Emma Hodcroft, and Richard Neher, MIT Licence

References

TreeTime: Maximum-likelihood phylodynamic analysis by Pavel Sagulenko, Vadim Puller and Richard A Neher. Virus Evolution.

NextStrain: real-time tracking of pathogen evolution by James Hadfield et al. Bioinformatics.