Distances, clustering and phylogenetic interpretation

Practical 6: Genomics, systems biology and multi-omics

Learning objectives

Inspect a distance matrix and the four-point relation; build an illustrative UPGMA tree; distinguish a clock-dependent clustering result from a species-history claim.

Biological question and data

What assumptions turn observed sequence differences into an evolutionary tree?

The supplied four-taxon distance matrix is fictional, additive and ultrametric. UPGMA is used only under this idealized equal-rate setting; it is not a general phylogenetic inference method.

No biological download is required. Numerical inputs are hypothetical, not observed animal data. The runnable examples use base R. Count and abundance units are specified where used.

1. Check the supplied distances

For the quartet ab|cd, the within-pair sum is smaller than the equal cross-pair sums.

Show R code
D <- matrix(c(0,2,6,6,2,0,6,6,6,6,0,2,6,6,2,0),4,4,byrow=TRUE,
 dimnames=list(c("a","b","c","d"),c("a","b","c","d")))
stopifnot(isSymmetric(D),all(diag(D)==0),all(D>=0))
sums <- c(ab_cd=D[1,2]+D[3,4],ac_bd=D[1,3]+D[2,4],ad_bc=D[1,4]+D[2,3])
sums
ab_cd ac_bd ad_bc 
    4    12    12 
Show R code
stopifnot(sums[2]==sums[3],sums[1]<sums[2])

The four-point relation supports the supplied split in an additive tree model. Exact equality is a feature of the constructed distances.

2. Build the idealized clustering tree

Average-linkage clustering is UPGMA. Tree branch heights can be interpreted with additional rate assumptions; plot heights are dissimilarities.

Show R code
fit <- hclust(as.dist(D),method="average")
plot(fit,ylab="Supplied dissimilarity",main="Idealized UPGMA example")

Show R code
reconstructed <- as.matrix(cophenetic(fit))
stopifnot(max(abs(reconstructed-D))<1e-12)
fit$height
[1] 2 2 6

The ideal matrix is exactly represented by the clustering ultrametric. That exact fit is not a general property of sequence distances.

3. Break the ideal assumption

Alter one pair symmetrically and measure the mismatch to its clustering representation.

Show R code
changed <- D; changed[1,3] <- changed[3,1] <- 8
other <- hclust(as.dist(changed),method="average")
c(max_cophenetic_discrepancy=max(abs(as.matrix(cophenetic(other))-changed)))
max_cophenetic_discrepancy 
                       1.5 

The new distances are no longer represented exactly by that UPGMA ultrametric.

4. Inspect the clock assumption directly

In an ultrametric distance matrix, the largest two pairwise distances within each triple agree. Examine a constructed triple and then a perturbed version.

Show R code
triple <- c(A_B=2,A_C=6,B_C=6)
perturbed <- c(A_B=2,A_C=6,B_C=8)
clock_gap <- function(v) diff(sort(v)[2:3])
c(ideal_largest_gap=clock_gap(triple),
 perturbed_largest_gap=clock_gap(perturbed))
    ideal_largest_gap.B_C perturbed_largest_gap.B_C 
                        0                         2 

This necessary ultrametric pattern is separate from the four-point relationship for an additive quartet. A distance matrix can be tree-additive without satisfying a molecular-clock assumption.

5. Separate clustering from evolutionary inference

UPGMA produces a hierarchical representation even when its evolutionary assumptions fail. A neat dendrogram does not demonstrate a clock. Real phylogenetic work also needs an appropriate alignment, substitution model and assessment of uncertainty. Gene duplication and recombination can complicate a species-history interpretation.

A bootstrap proportion describes repeatability under a resampling scheme and method. It is not automatically the posterior probability that a branch is correct. Record what was resampled and what the tree represents.

Interpretation challenge

If a perturbation changes the dendrogram, should the original matrix be retained because it looks cleaner?

No. The perturbation reveals sensitivity. Investigate the measurement/model basis of the distances and report uncertainty rather than selecting a more attractive representation.

Interpretation and limits

Real analyses must address sequence alignment, substitution model, rate differences, sampling and uncertainty. A gene tree can differ from population/species history through processes such as lineage sorting and recombination. Branches measured in substitutions cannot be labelled years without calibration.

Exercises

  1. Why does UPGMA require an equal-rate interpretation for phylogeny?
  2. Does exact reconstruction mean these fictional taxa exist?
  3. What would a bootstrap assess?
  1. Its rooted ultrametric representation assumes equal root-to-tip evolutionary distances.
  2. No; the matrix was constructed to illustrate the model.
  3. Resampling stability conditional on the data and procedure, not proof that every evolutionary assumption holds.

Continue learning

B05 Genomics; the Population Genetics molecular-clock practical supplies additional background.

Continue with sequencing quality. Return to the practical index or the unified map.