6.4.6Bioinformatics & Computational Biology

Describe phylogenetic tree construction algorithms

2,105 words10 min readdifficulty · medium

What is a phylogenetic tree?

There are two broad families of algorithms:

Family Input Idea
Distance-based a distance matrix DijD_{ij} cluster closest things first (UPGMA, Neighbor-Joining)
Character-based the aligned sequences themselves search for the tree that best explains every column (Maximum Parsimony, Maximum Likelihood, Bayesian)
Figure — Describe phylogenetic tree construction algorithms

Step 0 — Where does the distance matrix come from?

But pp underestimates true divergence because of multiple hits (a site may mutate A→G→A and look unchanged). The Jukes–Cantor correction fixes this.


Algorithm 1 — UPGMA (distance, rooted)

Unweighted Pair Group Method with Arithmetic mean.

HOW (the loop):

  1. Find the pair (i,j)(i,j) with smallest DijD_{ij}.
  2. Merge them into cluster uu; place node at height Dij/2D_{ij}/2.
  3. Update distances by weighted average of cluster sizes: D(u)k=niDik+njDjkni+njD_{(u)k} = \frac{n_i D_{ik} + n_j D_{jk}}{n_i + n_j}
  4. Repeat until one cluster remains.

Algorithm 2 — Neighbor-Joining (distance, unrooted)


Algorithm 3 — Maximum Parsimony (character-based)


Algorithm 4 — Maximum Likelihood & Bayesian (statistical)

Bootstrap: resample alignment columns with replacement, rebuild the tree many times; the % of replicates showing a clade = its support (≥70% ≈ reliable).


80/20 — the essentials


Feynman & Memory

Recall Explain to a 12-year-old (hidden)

Imagine friends who copied a story from each other and made small spelling mistakes. If two friends have almost the same mistakes, they copied recently. We draw a family tree of copies: friends with matching mistakes sit on the same little branch. UPGMA just keeps pairing the two most-alike friends. Neighbor-Joining is smarter — it also checks who is weird compared to everybody. Parsimony picks the tree that needs the fewest new spelling mistakes to explain everything. Likelihood uses probability rules for how often letters change to find the most believable tree.


Flashcards

What does a branch length in a phylogenetic tree represent?
The amount of evolutionary change (substitutions per site) along that lineage.
Which assumption does UPGMA make that NJ does not?
A molecular clock (constant substitution rate), giving an ultrametric rooted tree.
Why does p-distance underestimate true evolutionary distance?
It ignores multiple substitutions at the same site (hidden back/parallel mutations).
State the Jukes–Cantor distance formula.
d=34ln(143p)d = -\tfrac{3}{4}\ln(1-\tfrac{4}{3}p).
In Neighbor-Joining, which pair is joined?
The pair with the minimum value in the Q-matrix Qij=(n2)DijkDikkDjkQ_{ij}=(n-2)D_{ij}-\sum_k D_{ik}-\sum_k D_{jk}.
What is the goal of Maximum Parsimony?
Find the tree requiring the fewest total evolutionary changes (Occam's razor).
Name the algorithm used to count minimum changes per column in parsimony.
Fitch's algorithm (set intersection/union, bottom-up).
What is long-branch attraction?
Artifactual grouping of unrelated fast-evolving taxa due to coincidental shared states.
What does Maximum Likelihood maximize?
P(data | topology, branch lengths, substitution model).
How is an unrooted tree usually rooted?
By including an outgroup — a known distantly related taxon.
What does a bootstrap value of 90% mean?
90% of resampled datasets recovered that clade — strong support.
UPGMA cluster-distance update formula?
D(u)k=niDik+njDjkni+njD_{(u)k}=\dfrac{n_iD_{ik}+n_jD_{jk}}{n_i+n_j} (size-weighted average).

Connections

  • Sequence Alignment — provides the aligned columns/distance matrix.
  • Substitution Models (JC, K2P, GTR) — power distance correction & ML.
  • Molecular Clock Hypothesis — assumption behind UPGMA.
  • Bootstrap and Resampling Statistics — branch support.
  • Occam's Razor and Parsimony — logical basis of MP.
  • Homology vs Homoplasy — the signal vs noise in tree building.

Concept Map

count differences

Jukes-Cantor corrects

fills

input to

input to

cluster closest

best explains columns

produce

produce

branch length encodes

topology encodes

roots

Aligned sequences

p-distance

True distance d

Distance matrix Dij

Distance-based methods

Character-based methods

UPGMA and Neighbor-Joining

Parsimony, Likelihood, Bayesian

Phylogenetic tree

Evolutionary distance

Shared ancestry

Outgroup

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, phylogenetic tree ka pura funda simple hai: jo sequences zyada milte-julte hain, woh recently alag hue (close relatives), aur jo bahut alag hain woh bahut pehle diverge hue. Pehle hum sequences ko align karte hain, phir differences count karke ek distance matrix banate hain. Lekin seedha p-distance galat hota hai kyunki ek hi site pe multiple mutations ho sakte hain (A→G→A dikhta same), isliye Jukes-Cantor correction lagate hain — log wale formula se true distance thoda upar chala jata hai.

Do main family hain. Distance-based methods matrix se kaam karte hain: UPGMA sabse aasan hai — bas do closest clusters ko join karo aur ancestor ko beech mein (D/2 height pe) rakho. Par UPGMA ek badi assumption maanta hai — molecular clock, matlab sab lineages same rate se evolve ho rahe hain. Agar yeh galat ho (koi taxon fast mutate kare) to UPGMA galat tree deta hai. Isliye practical default hai Neighbor-Joining (NJ) — yeh Q-matrix use karke woh pair choose karta hai jo close bhi ho aur baaki sabse door bhi, isse "true neighbours" mil jaate hain, aur clock assume nahi karna padta.

Doosri family character-based hai jo directly alignment columns dekhti hai. Maximum Parsimony Occam's razor lagata hai — jis tree mein sabse kam mutations chahiye woh best (Fitch algorithm se count karo). Par high divergence pe iska classic problem hai long-branch attraction — unrelated fast taxa galat group ho jaate hain. Isliye sabse accurate hai Maximum Likelihood aur Bayesian, jo substitution model (probability) use karke most believable tree nikalte hain. Kyunki possible trees bahut zyada ho jaate hain (10 taxa = 3 crore+ trees), yeh heuristic search aur MCMC use karte hain. Tree ki reliability check karne ke liye bootstrap ya posterior probability dekho — 70-90% se upar matlab strong support. Yaad rakhna: "U Never Play Loud" = UPGMA, NJ, Parsimony, Likelihood.

Test yourself — Bioinformatics & Computational Biology