Building phylogenies#

Building A Phylogenetic Tree From Pairwise Distances#

Directly via alignment.quick_tree()#

Directly via alignment.quick_tree() with a third-party hook#

You can use the IQ-TREE rapid-NJ algorithm for quick_tree() by installing piqtree and setting use_hook="piqtree".

Using the DistanceMatrix object#

Explicitly via DistanceMatrix and cogent3.phylo.nj.nj()`#

Directly from a pairwise distance dict#

By Least-squares#

We illustrate the phylogeny reconstruction by least-squares using the F81 substitution model. We use the advanced-stepwise addition algorithm to search tree space. Here a is the number of taxa to exhaustively evaluate all possible phylogenies for. Successive taxa are added to the top k trees (measured by the least-squares metric) and k trees are kept at each iteration.

Other optional arguments that can be passed to the trex method are: return_all, whether the k best trees at the final step are returned as a ScoredTreeCollection object; order, a series of tip names whose order defines the sequence in which tips will be added during tree building (this allows the user to randomise the input order).

By ML#

We illustrate the phylogeny reconstruction using maximum-likelihood using the F81 substitution model. We use the advanced-stepwise addition algorithm to search tree space.