LING 645
Tree-Builder

One cognate matrix, multiple ways to build a family tree: shared-cognate percentages, neighbor-joining, NeighborNet, parsimony and a Bayesian-style MCMC walk. Edit the data and every tree redraws.

For demonstration purposes only: do not rely on this tool for actual analyses.

The cognate matrix

Same letter in a row = same cognate set. Blank or ? = missing. Untick a row to drop it.

Paste your own data

Tab- or comma-separated. First row: meaning, Lang1, Lang2, …. Then one row per meaning with cognate-set labels (any letters or numbers). Up to 60 languages; '?', '-' or a blank cell means missing.

Distance: count, average, cluster

Lexicostatistics turns the matrix into one number per pair, then throws the characters away.

Percent shared cognates

Darker = more shared. Pairs are compared only on meanings where both have data.

UPGMA tree (lexicostatistics)

Joins the closest pair, averages, repeats. Assumes every language changes at the same rate, so it always produces a rooted tree with all tips lined up.

Neighbor-joining tree

Neighbor-joining uses the same distances but corrects for each language's overall distance from all the others, so a fast-changing language gets a long branch instead of being pushed to the edge of the tree.

The result is unrooted: it shows who groups with whom, not where the ancestor sits. Branch lengths are drawn to scale.

NeighborNet network

NeighborNet uses the same distances but does not force them into a tree. Where the distances support two groupings that cannot both be in one tree, it draws both, and the conflict appears as a box of parallel edges.

A long, thin box means weak conflict; a fat box means strong conflict. Where there is no box, the data are tree-like. Like neighbor-joining, the network is unrooted, and edge lengths are drawn to scale.

Try this (Tavaric set)

  1. Find the pair with the highest percentage. Does UPGMA join it first?
  2. Compare where Faru sits in the UPGMA and NJ trees. Which tree says Faru belongs with Dara and Eno?
  3. Count Faru's unique cognate sets in the matrix. What does that do to its percentages, and why does UPGMA misread it?
  4. Find the box in the NeighborNet. Which two groupings does it show in conflict? Which rows of the matrix could cause it? Untick them and watch the box.

Parsimony: fewest changes wins

Every possible tree is scored by the minimum number of cognate replacements it needs.

Selected tree

Best trees

Click a tree to draw it. Lower is better.

Try this (Tavaric set)

  1. Which meanings need extra changes on the best tree? Look at those rows in the matrix. What could explain them?
  2. Untick those rows. How much does the gap between the best and second-best tree grow?
  3. Rows where every language agrees, or only one language differs, never change a score. Why not?

MCMC: a random walk through tree space

Each step swaps two branches. Better trees are always accepted; worse ones only some of the time.

Current tree

Trace: changes needed at each step

Step0
Current score–
Accepted–
Trees sampled0
Best found–
Press Step once to watch a single proposal, or Run to let the chain go.

How it decides: a tree that needs Δ more changes than the current one is accepted with probability e−βΔ. With β = 1, a tree 1 change worse is accepted about 37% of the time and one 2 changes worse about 14%. Higher β makes the walker stick close to the best trees; lower β lets it wander. A real Bayesian program uses a model of cognate gain and loss here instead of a change count.

Clade support across sampled trees

Run the chain to collect samples.

Majority-rule consensus

Only groups found in more than half the samples. Support percentages are on the branches for small datasets and in the list for large ones.

Try this (Tavaric set)

  1. Run 5,000 steps with all rows included. What support does Dara + Eno + Faru get? What competes with it?
  2. Reset, untick the rows parsimony flagged, and run again. What happens to support for each group?
  3. Set β to 0.3 and then to 3. Which setting explores more trees? Which gives a more confident consensus, and should we trust it?