3. Overview of program

This section provides an overview of the program.

3.1 Starting TreeMap


You can start TreeMap by:

Double-clicking on the TREEMAP icon.

Double-clicking on a TREEMAP document.

Dragging a TREEMAP document onto the TREEMAP application icon.


You can start TREEMAP by:

Double clicking on the TREEMAP icon if you've add TREEMAP to Program Manager (see your Windows documentation on how to do this).

Dragging a TREEMAP data file onto the TREEMAP.EXE file in File Manager or other file management software (e.g. XTree for Windows).

3.2 Windows

TREEMAP has four main windows which display various views of your data. Windows can be selected by clicking on them, or by using the Windows menu. The font used to draw text in each window can be altered using the Style menu. The contents of each window can be printed (File | Print), copied to the Clipboard (Edit | Copy), or saved to disk as a picture (File | Save Graphics File) or text (File | Save Text File) file. Note that pictures, whether copied to the Clipboard or saved to disk, are formatted to fit on a complete page, they also have the same orientation as the current printer settings. Hence, for some windows you may want to alter the page set-up of your printer (File | Page setup) before creating a picture.

3.3 Tanglegram Window

The Tanglegram window displays the current host and parasite trees with parasites connected to hosts by a coloured line:

You can alter the appearance of the trees by changing the font used to draw the labels (using the commands on the Style menu), and by rotating descendants about their ancestor, thus "untangling" the trees. To do this, click on the desired branch.

With some practice, you'll quickly be able to obtain a pleasing display. Note that you're not actually altering the phylogenetic relationships specified by the trees, merely how the trees are drawn.

If your trees have branch length information you can display the trees as "phylograms" by choosing the View | Phylogram command. To ignore branch lengths choose View | Cladogram. You can also toggle on and off the numbering of the internal nodes of the trees (View | Internal labels). These numbers are arbitrary and are used to keep track of the internal nodes. To display branch lengths in host and parasite at the same scale choose View | Same scale.

Choosing other trees

If you have more than one host or parasite tree, you can change the tree you're looking at using the popup menus in the Tanglegram window. These list the names of the trees listed in the input file. Because the same trees are being compared in all windows, changing a tree in the Tanglegram window also changes the tree in the Reconstruction window and the Branch lengths window.

3.4 Reconstruction Window

The Reconstruction window displays the parasite tree (in black) overlaid on the host tree (in light grey). This window is the core of TREEMAP, as it is here that you can experiment with different reconstructions, find optimal reconstructions, and perform various randomisation tests.

Creating a reconstruction

By default, TREEMAP reconciles the parasite and hosts trees, however unlike COMPONENT, TREEMAP superimposes the parasite tree on the host tree (cf. Page, 1994: fig. 2c), rather than displaying the reconciled tree itself.

The parasite tree is drawn in black slightly below the host tree (drawn in grey), with each node in the parasite tree draw below the corresponding node in the host tree. You may want to alter the font to improve the display.

Interpreting the reconstruction

Reconstructions can be best explained using an example. The file SIMPLE.NEX contains two small trees:

Fig. 1 Host and parasite trees from the file SIMPLE.NEX.

As you can see they are incongruent. Go to the Reconstruction window to see the reconciled tree:

Fig. 2 Reconciled tree for the host and parasite trees in Fig. 1. This tree has one cospeciation event, one duplication event, and three sorting events

Reconciled trees are discussed in detail in Page (1994). In the figure above, the two internal nodes on the parasite tree comprise a cospeciation event () and a duplication (). Along the bottom of the Reconstruction window the status line appears showing the statistics for this reconstruction.

Sorting events occur when parasites go extinct, or are differentially sorted amongst hosts. For example, two sorting events occurred when host 4 speciated into b and c. Given that host 4 harbours two parasites, we might have expected each to speciate, so that hosts b and c each had two parasites. Either this did not happen (hence parasite II was passed on to host b, and parasite III was passed onto host c) or there was speciation, but only one descendant of each event survived. The other sorting event is associated with the duplication event at the base of the parasite tree.

Host switching

The reconciled tree prohibits association by colonisation, that is, it prohibits host switching. Let's suppose that parasite "I" is associated with its host "a" by colonisation, not by descent. To see what that reconstruction looks like simply click on the parasite's name ("I"). You should now see a new reconstruction:

Fig. 3 A reconstruction with one instance of host switching (the line marked with the arrow )

This reconstruction also has one instance of cospeciation, but no duplications or sorting events. By clicking on "I" again you revert to the reconciled tree. Now try clicking on "II":

Fig. 4 An alternative reconstruction

This reconstruction also has one cospeciation and one host-switch, but in addition it has a single sorting event (on parasite lineage III where host 4 speciates into b and c).

Prohibited host switches

Note that TREEMAP will not allow some host-switches. Specifically it requires that:

the ancestral host for all parasites be defined, and

all host switches are between contemporaneous hosts.

The first requirement means that the root of the parasite tree and its two immediate descendants cannot disperse. The second requirement prohibits spurious dispersals such as from a host onto an ancestor of that host, which by definition no longer exists. These requirements are discussed in Page (in press).

Host-switches need not be restricted to terminal taxa. In larger phylogenies you can click on the internal nodes to create ancestral host-switching events.

3.5 Histogram Window

The Histogram window displays histograms obtained when you perform randomisation tests (see below). You have the option of viewing the histogram as a graphic or as a text summary, by choosing the View | Graphic as text command.


The histogram TREEMAP draws is rather unattractive. If you copy it to the Clipboard you can paste it into a graphics program for editing.

You can use the File | Save as text file to create a text file containing a text summary of the histogram.

3.6 Branch Lengths Window

If your host and parasite trees have branch lengths, TREEMAP displays a Branch Lengths Window containing a bivariate plot of the lengths of the corresponding branch lengths. It computes and displays the correlation coefficient between the branch lengths in the two trees. Again, this plot will not win any prizes for graphic design. The File | Save text file... command allows you to create a text file listing each data point which can be imported into a spreadsheet or charting program to produce nicer graphics.

Types of plot

The types of branch length plot available depend on the types of tree you have. If the tips of the trees all line up then the trees are ultrametric (see below). Ultrametric trees are produced by phylogeny programs that assume a molecular clock, such as KITSCH and DNAMLK in PHYLIP. Additive trees need not have all tips line up, and hence do not assume a molecular clock.

If the current host and parasite trees are not ultrametric trees then TREEMAP plots the lengths of the copaths (see below) in the two trees. However, if you have ultrametric trees then you have two options, plotting branch lengths (copaths) or plotting coalescences times.


A copath is a path between successive cospeciation events, or between a terminal taxon and its most recent ancestor that is also a cospeciation event; hence a copath traces out equivalent paths in the host and parasite tree. In the Branch Lengths window the data points are labelled with the number of the host and parasite nodes that are most distant from the root. If either of these nodes is a terminal taxon, the data point is labelled with the name of that taxon.

Coalescence times

The coalescence time is the time two lineages last had a common ancestor. On an ultrametric tree this corresponds to the distance between the ancestral node and any one of its descendants:

In the tree above there are three coalescence events, hence three coalescence times (1-3). Given ultrametric host and parasite trees, we can plot the coalescence time of each pair of cospeciation nodes (Hafner and Page, in press). For example, given these two ultrametric trees,

Fig. 5. Ultrametric trees for pocket gophers and their lice. Cospeciation nodes are numbered in bold

the coalescence plot looks like this:

Fig. 6. Plot of coalescence times (in units of genetic distance) for the cospeciation events in Fig. 5. Each point is labelled with the numbers of the corresponding nodes in the host and parasite trees, respectively. For example, the point 9-12 plots the coalescence time (measured in units of genetic distance) for the parasite node 12 and its corresponding host node 9.

Because ultrametric trees are constrained to have all pairs of terminal taxa equidistant from their most recent common ancestor these pairs are not independent; hence if you have two ultrametric trees and request Plot branch lengths TREEMAP only plots the lengths of the internal copaths.