Leigh Brown  

Rooting, Measuring, and Collapsing Phylogenies

This command-line Java program allows you to import trees with bootstraps and branch lengths and then root the tree, collapse the tree, and measure the length and other attributes of the tree.

Download program TreeCollapseCL4.jar
Download manual TreeCollapseCL.pdf

It's highly recommended that you visit the TreeCollapseCL website to read the full description of the program, download the latest version, report problems, and join the mailing list!


This program provides an easy way to do simple and useful manipulation of your phylogeny.

  • If an outgroup is specified by the user, the tree is rooted or re-rooted to that outgroup.
  • If a bootstrap support-value threshold is provided by the user, and all nodes with bootstrap values below this threshold are collapsed to polytomies. The length of the tree is preserved.
  • Finally, the length from each leaf to the node above the root node (if an outgroup is present, the length from root to first node can be strongly influenced by the outgroup) is calculated, and the average bootstrap value (average of each bootstrap value between the leaf node and the root) is calculated for each leaf

Associated publication

Hodcroft E, Hadfield J, Fearnhill E, Phillips A, Dunn D, O'Shea S, Tong W, Pillay D, and Leigh Brown A, on behalf of the UK HIV Drug Resistance Database and UK CHIC. Estimating the Contribution of Viral Genotype to Plasma Viral Set Point in HIV Infection (In Preparation).


If you publish or present work that has been processed using this program, please cite Emma Hodcroft and the website where this program can be downloaded (http://emmahodcroft.com/TreeCollapseCL.html).


To run TreeCollapseCL, you will need Java 1.6.0 or higher. The jar file will run on PC, Mac, UNIX and LINUX operating systems.

Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh.

Accessibility statement