Evolutionary trees are frequently used to describe genetic relationships between populations. Hierarchical, bifurcating trees are a reasonable model for the evolution of DNA sequences and species, but may not be appropriate for describing population structrue in populations connected by gene flow. For example, if populations are arranged in a stepping stone pattern, the genetic relationships between populations will not follow a hierarchical pattern and UPGMA trees may not be appropriate tools for describing the structure of such populations.

The computer program TreeFit was written to analyze how well a tree fits the genetic data the tree was calculated from. TreeFit creates neighbor-joining and UPGMA trees from a genetic distance matrix, and then compares the observed genetic distance between populations with the genetic distance in the tree. The similarity between these distances is express as R-squared, the familiar statistic used to summarize the scatter of points around a least-squares regression line.

TreeFit also performs some simple analyses useful for looking at unrooted trees. These include: calculating genetic distances, viewing the branch lengths of trees, and bootstraping trees (over loci).

A manuscript describing the program is available at this link.

Input file format

Input files must be text files of genotypes in GENEPOP format. The GENEPOP file format is described on the program's webpage.


TreeFit runs on the Microsoft Windows operating system that has the .NET platform installed. See my Software page for instructions on how to install this on your computer (it probably is already there). Click here to download a ZIP file containing TreeFit and a library of functions (kalinowski_library.dll) that the program needs. A sample data file is available here.

Installation / Uninstallation

To "install," place TreeFit.exe and kalinowski_library.dll in the same folder. Click on TreeFit.exe to run. Delete both files to "uninstall."


Please cite the following paper:

  • KALINOWSI ST (2009) How well do evolutionary trees describe genetic relationships between populations? Heredity 102:506-513.