Wednesday, July 15, 2026
SAVED POSTS
  • Login
  • Register
RathBiotaClan
No Result
View All Result
  • HOME
  • HEALTH SCIENCE

    TRENDING ON HEALTH (TOP)

    Fick Method Underestimates Heart Problems in Children After Heart Transplant, Study Finds

    For Women on Antidepressants, Creatine Showed a Possible Extra Boost

    Did the iPhone Quietly Reshape When and Whether Americans Have Children?

    For People Antidepressants Never Helped, a 30-Minute Home Session Is Now FDA-Approved

    NOW ON AIR (RBC)

    The parsimony criterion
    BIOINFORMATICS

    The Parsimony Criterion in Phylogenetics: Morphological & Molecular Methods

    July 15, 2026
    maximum-likelihood-criterion
    BIOINFORMATICS

    Maximum Likelihood Criterion in Phylogenetic Tree Reconstruction

    July 15, 2026
    Tree Optimization Criteria and Search Methods in Phylogenetics – NNI, SPR, TBR Explained
    BIOINFORMATICS

    Tree Optimization Criteria and Tree Search Methods in Phylogenetics

    July 15, 2026
    Bootstrapping in Phylogenetics
    BIOINFORMATICS

    Bootstrapping in Phylogenetics – Tree Reliability, Resampling & Bootstrap Values

    July 15, 2026
  • NEUROSCIENCE
    • PHYSIOLOGY
    • IMMUNOLOGY
    • CANCER
  • DISCOVERIES
    • SPOTLIGHTS
    • STUDENT PORTAL
    • SCIENCE FEATURED
  • MOLECULAR BIOLOGY
    • GENETICS
    • BIOTECHNOLOGY
    • BIOINFORMATICS
    • BIOCHEMISTRY
    • BIOPHYSICS
  • ZOOLOGY & ECOLOGY
    • ENVIRONMENTAL SCIENCE
    • ECOLOGY
    • EVOLUTION
  • MICRO & PLANT SCIENCE
    • MICROBIOLOGY
    • CELL BIOLOGY
    • DEVELOPMENTAL BIOLOGY
  • PSYCHOLOGY
RathBiotaClan
RathBiotaClan
No Result
View All Result
Home BIOINFORMATICS

Distance Matrices and Clustering Methods in Phylogenetics – UPGMA & Neighbor-Joining Explained

Shibasis Rath by Shibasis Rath
July 15, 2026
in BIOINFORMATICS, STUDENT PORTAL
Reading Time: 17 mins read
0
A A
0
ˇDistance Matrices and Clustering Methods

Distance-based methods form one of the major approaches used in molecular phylogenetics for reconstructing evolutionary trees. In this approach, the evolutionary distance between every pair of sequences is first calculated and arranged in the form of a distance matrix. This matrix is then used as the input for a clustering algorithm, which progressively joins the most closely related sequences together until a complete tree connecting all the species is obtained.

The two clustering methods of greatest importance in phylogenetics are the UPGMA (Unweighted Pair Group Method with Arithmetic Mean) and the Neighbor-Joining (NJ) method. Both methods use a distance matrix as their starting point, but they differ considerably in the assumptions they make and in the type of tree they produce.

Calculating Evolutionary Distances

Before any clustering can be performed, the evolutionary distance between each pair of sequences must be calculated from a multiple sequence alignment. This calculation requires the choice of an appropriate evolutionary model. Several such models exist, differing in their assumptions about the pattern of nucleotide substitution, but the Jukes–Cantor (JC) model is often used as a starting point because it is the simplest available model. Its simplicity makes it convenient for comparing results obtained from different phylogenetic methods.

The JC model assumes that all four nucleotide bases occur with equal frequency, an assumption that is often not strictly true in real biological sequences, such as ribosomal RNA genes. Consequently, more complex models that account for unequal base frequencies and different substitution rates generally provide a better fit to real data. Nevertheless, when a data set contains a strong underlying phylogenetic signal, even the simplest model such as JC can recover this signal reasonably well.

Once pairwise distances have been calculated using a chosen model, they are arranged into a distance matrix, whose elements, denoted d(i,j), represent the evolutionary distance between species i and species j. This matrix has two defining properties:

  • It is symmetric, meaning that the distance from species i to species j is equal to the distance from species j to species i, i.e., d(i,j) = d(j,i).
  • The diagonal elements are zero, since the distance of any sequence from itself must be zero.

In an illustrative example using primate mitochondrial sequences, the human-to-chimpanzee distance was found to be about 2.77%, the smallest pairwise distance was about 1.49% (between chimpanzee and pygmy chimpanzee), and the largest distance within the group was close to 20% (between orangutan and proboscis monkey). Distances between primates and more distantly related outgroup species such as mouse were considerably higher, in the range of 26–30%, reflecting the relatively rapid rate of evolution of mitochondrial sequences compared to nuclear genes. It is also important to note that highly variable, unreliably aligned regions of the sequence are typically removed before distance calculation; had these regions been retained, the calculated distances would have been somewhat higher.

Jukes–Cantor (JC) Distance Matrix

Distance matrix calculated from mitochondrial small subunit (12S) rRNA sequences. The matrix is divided to highlight the major evolutionary split within the Catarrhini between the Old World monkeys and the apes.
SpeciesBaboonMacaqueColobusGibbonOrangutanGorillaChimpanzeeHuman
Old World Monkeys
Baboon0.0000.0210.0340.0720.0780.0820.0850.087
Macaque0.0210.0000.0310.0700.0760.0810.0840.086
Colobus0.0340.0310.0000.0680.0740.0790.0830.085
Apes
Gibbon0.0720.0700.0680.0000.0410.0460.0490.051
Orangutan0.0780.0760.0740.0410.0000.0290.0310.033
Gorilla0.0820.0810.0790.0460.0290.0000.0170.019
Chimpanzee0.0850.0840.0830.0490.0310.0170.0000.011
Human0.0870.0860.0850.0510.0330.0190.0110.000
Old World Monkeys
Apes
Diagonal (Self-distance = 0)
Figure. Example Jukes–Cantor (JC) evolutionary distance matrix calculated from mitochondrial small subunit (12S) rRNA sequences. Each cell represents the estimated evolutionary distance between two taxa after correcting for multiple nucleotide substitutions using the Jukes–Cantor model. The matrix is divided into two major sections to emphasize the principal phylogenetic split within the Catarrhini, separating the Old World monkeys (Baboon, Macaque, and Colobus) from the apes (Gibbon, Orangutan, Gorilla, Chimpanzee, and Human). Lower JC distance values indicate closer evolutionary relationships, whereas larger values reflect greater genetic divergence.

General Principle of Clustering Algorithms

A distance matrix, once obtained, can be used as input to a clustering algorithm to build a phylogenetic tree. The general clustering procedure follows three repeated steps:

  1. Join the closest two clusters to form a single larger cluster.
  2. Recalculate the distances between this new cluster and all the remaining clusters.
  3. Repeat the above two steps until all the species have been connected into a single, fully resolved tree.

At the start of this process, each individual species is treated as forming its own separate cluster. As the algorithm proceeds, clusters progressively merge and grow larger, until eventually all species are joined together into one complete tree. The two major clustering methods used in phylogenetics — UPGMA and Neighbor-Joining — both follow this general clustering logic, but they differ in how the distances between clusters are recalculated and in the type of tree topology they are capable of producing.

The UPGMA Method

Basic Concept

UPGMA stands for the Unweighted Pair Group Method with Arithmetic Mean. It belongs to a family of hierarchical clustering methods and is considered conceptually the simplest phylogenetic clustering method, although it is now rarely used in serious phylogenetic research owing to certain important limitations discussed below.

Procedure

  • Step 1: The two closest species in the distance matrix are identified and connected first. For example, in a primate data set, the chimpanzee and pygmy chimpanzee, being the closest pair, would be joined first.
  • Step 2: The distance between this newly formed cluster and all other remaining species or clusters is recalculated. In UPGMA, this distance is defined simply as the arithmetic mean of the distances between all species in the two clusters being compared. For instance, the distance from a species such as human to the chimpanzee/pygmy chimpanzee cluster would be calculated as the average of the human–chimpanzee and human–pygmy chimpanzee distances. If distances between a two-species cluster and a three-species cluster are required, the mean is taken over all six (2 × 3) pairwise distances between members of the two clusters.
  • This process of joining the closest clusters and recalculating distances is repeated until all species are connected into a single rooted tree.

It is this particular definition of inter-cluster distance, as a simple arithmetic mean, that distinguishes UPGMA from the other hierarchical clustering methods.

UPGMA Phylogenetic Tree

Phylogenetic tree reconstructed using the Unweighted Pair Group Method with Arithmetic Mean (UPGMA) from the Jukes–Cantor (JC) distance matrix.
Baboon Macaque Colobus Gibbon Orangutan Gorilla Human & Chimpanzee Old World Monkeys Apes Genetic Distance
Figure. UPGMA phylogenetic tree reconstructed from the Jukes–Cantor (JC) distance matrix. The topology separates the Old World monkeys (Baboon, Macaque, and Colobus) from the apes (Gibbon, Orangutan, Gorilla, and Human–Chimpanzee), illustrating the major evolutionary divergence within the Catarrhini. Branch lengths are proportional to the estimated genetic distances under the UPGMA clustering method.

Nature of the Tree Produced

The UPGMA method produces a rooted tree, in which the lengths of the branches are proportional to the amount of evolutionary time inferred to separate the species. This means that UPGMA implicitly assumes a strict molecular clock, that is, it assumes that all lineages are evolving at the same constant rate. The height of any internal node above the baseline of the tree represents half the distance between the two groups being joined at that node, since it is assumed that the changes separating the two groups are divided equally between the two branches leading to them. The final node at which the last two remaining clusters are joined is taken to represent the root of the tree — a feature that distinguishes UPGMA from most other phylogenetic methods, which generally do not indicate the position of the root.

Concept of Ultrametricity

A key property associated with UPGMA trees is ultrametricity. A tree, or the distance matrix underlying it, is said to be ultrametric if, for any three species chosen from the tree, the two largest of the three pairwise distances between them are exactly equal. This arises because, in such a tree, two of the three species are always more closely related to each other than either is to the third, and both of their distances to the third species are determined by the same branching point.

  • If we consider true evolutionary divergence times between species, these times are expected to be exactly ultrametric.
  • If sequences evolve strictly according to a molecular clock, the observed sequence distances will be only approximately ultrametric, because nucleotide substitutions occur as random events; although two descendant lineages are expected to accumulate the same number of substitutions on average, one lineage may by chance accumulate slightly more substitutions than the other.
  • If different species evolve at genuinely different rates, then there is no reason to expect that the two largest distances among any three species will be equal, and the true relationships will deviate substantially from ultrametricity.

The UPGMA algorithm works by finding the best-fitting ultrametric tree such that the distances measured along its branches approximate as closely as possible the distances present in the original distance matrix.

Limitations of UPGMA

  • UPGMA forces all the species onto an ultrametric tree, regardless of whether the real underlying pattern of evolution follows a strict molecular clock or not.
  • If different lineages are actually evolving at markedly different rates, the assumption of a molecular clock is violated, and the resulting UPGMA tree is likely to be incorrect.
  • For this reason, although UPGMA can perform well for closely related groups showing a strong, clock-like phylogenetic signal (such as within the Catarrhini, where the tree obtained corresponds well with generally accepted relationships), it tends to give an incorrect topology when more distantly related species with unequal evolutionary rates are included.
  • Because of this limitation, UPGMA is generally not recommended for serious modern phylogenetic studies, even though it remains valuable as an introductory method for understanding the basic logic of distance-based clustering.

The Neighbor-Joining (NJ) Method

Basic Concept

The Neighbor-Joining method, developed by Saitou and Nei (1987), is a clustering method that, unlike UPGMA, produces an unrooted tree. Rather than assuming a molecular clock, NJ relies on a less restrictive mathematical property called additivity.

ADVERTISEMENT

Concept of Additivity

A tree is said to be additive if the distance between any two tip species on the tree is exactly equal to the sum of the lengths of all branches connecting them. A distance matrix is described as additive if there exists some tree, with specific branch lengths, such that every pairwise distance in the matrix is exactly reproduced by summing branch lengths along the corresponding path in the tree.

READ ALSO

The Parsimony Criterion in Phylogenetics: Morphological & Molecular Methods

Maximum Likelihood Criterion in Phylogenetic Tree Reconstruction

  • Additivity is a less restrictive condition than ultrametricity.
  • Every ultrametric matrix is also additive, but an additive matrix need not be ultrametric.
  • The NJ method is designed to construct an additive tree whose branch-length distances closely approximate the distances present in the original matrix.
  • If the original distance matrix is exactly additive, NJ is guaranteed to recover the correct tree, just as UPGMA is guaranteed to be correct if the matrix is exactly ultrametric.
  • In real data, distances are rarely exactly additive, so in practice NJ produces only an approximation to the true tree.

Concept of Neighbors

Two species are described as neighbors on an unrooted tree if they are connected to each other through a single internal node, without any other tip species lying between them.

ADVERTISEMENT

Procedure

  • The method begins with a set of disconnected tip nodes, one for each sequence, with the pairwise distances between them already known from the input distance matrix.
  • The algorithm identifies a pair of nodes, i and j, that qualify as neighbors and joins them by creating a new internal node, n.
  • The original nodes i and j are then removed from further consideration, since they are already incorporated into the growing tree, leaving one fewer disconnected node than before.
  • Distances from the new internal node to all remaining nodes are then calculated using the assumption of additivity.
  • This entire process is repeated, progressively reducing the number of disconnected nodes, until all nodes have been connected into a single, fully resolved unrooted tree.

An important methodological point is that the pair of nodes to be joined at each step cannot simply be chosen as the pair with the smallest raw distance, since the two species with the smallest observed distance are not always true neighbors on the tree. To overcome this problem, the NJ algorithm calculates a set of modified distances that correct for this effect before deciding which pair of nodes to join at each step.

ADVERTISEMENT

Application to Primate Data and Interpretation

When applied to a primate mitochondrial sequence data set, the Neighbor-Joining method produced a tree topology that largely agreed with the taxonomic classification expected from prior knowledge. Notable features of the resulting tree included:

  • The Catarrhini and Platyrrhini each formed well-defined, distinct clusters.
  • The lemur and bushbaby clustered together, as did the two tarsier species, the two tree shrew species, and the two rodent species.
  • Since the NJ method does not indicate the position of the root, prior biological knowledge was used to place the root on the branch leading to the rodents, making the resulting tree easier to interpret.
  • Within the Platyrrhini, the marmoset and tamarin (members of the family Callitrichidae) clustered together, but the remaining four New World monkey species, classified taxonomically as Cebidae, did not form a monophyletic group. This result, supported by other phylogenetic methods as well as by independent studies using the same gene, suggests that grouping these species together as Cebidae may not accurately reflect their true evolutionary relationships.
  • A more serious discrepancy was that the tree shrews appeared as the sister group to the tarsiers in the NJ tree, a result considered almost certainly incorrect, since it would imply that primates are not a monophyletic group. This conflicts with strong morphological evidence supporting the tree shrews (Order Scandentia) as a group separate from the primates, indicating that the NJ tree can sometimes be misleading in resolving certain relationships.

Advantages of the Neighbor-Joining Method

  • NJ is a practical and rapid method capable of producing a fairly reliable phylogenetic tree, and for this reason it is very widely used in real phylogenetic studies.
  • The algorithm has a time complexity of O(N), meaning that results can be obtained almost instantaneously even for very large numbers of sequences, in contrast to more computationally intensive methods.
  • NJ is guaranteed to give the exact correct tree if the underlying distance matrix is precisely additive, and it generally performs well when the matrix is reasonably close to additive.

Limitations of the Neighbor-Joining Method

  • If the input distances deviate substantially from additivity — for example, due to the use of an inappropriate distance-calculation model or as a result of poor sequence alignment — the NJ method is likely to produce an incorrect tree topology.
  • The method does not indicate the position of the root, so external biological knowledge must be used to correctly root the resulting tree.

Comparison Between UPGMA and Neighbor-Joining

  • UPGMA produces a rooted tree; NJ produces an unrooted tree.
  • UPGMA assumes a strict molecular clock (equal rates of evolution across all lineages); NJ makes the less restrictive assumption of additivity and does not require a molecular clock.
  • UPGMA is guaranteed correct only if the distance matrix is ultrametric; NJ is guaranteed correct if the matrix is additive, a condition that is less restrictive and more often approximately satisfied in real data.
  • UPGMA directly indicates the position of the root; NJ does not, and the root must be inferred using prior biological knowledge, such as the inclusion of an appropriate outgroup.
  • UPGMA is more likely to give incorrect results when species evolve at markedly different rates, whereas NJ generally performs more reliably under such conditions, though it is not free of errors, as seen in the misplacement of tree shrews relative to tarsiers.

Conclusion

Distance-based clustering methods provide a computationally efficient and conceptually accessible approach to phylogenetic tree reconstruction, beginning with the calculation of pairwise evolutionary distances and proceeding through iterative clustering of the most closely related sequences. The UPGMA method, though historically important and simple to understand, relies on the restrictive assumption of a molecular clock and produces reliable results only when the underlying distance matrix is close to ultrametric; it therefore performs poorly when evolutionary rates vary across lineages. The Neighbor-Joining method overcomes many of these limitations by relying on the less restrictive property of additivity, producing an unrooted tree that is generally more reliable, computationally efficient, and widely applicable, although it too can produce misleading results when the input distances deviate significantly from additivity or when sequence alignment is unreliable. The application of both methods to primate mitochondrial rRNA data illustrates how strong phylogenetic signal within closely related groups such as the Catarrhini can be recovered even with simple methods, while also highlighting the limitations of distance-based approaches when applied to more distantly related or rapidly evolving lineages.

  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Print (Opens in new window) Print
Shibasis Rath

Shibasis Rath

"𝓒𝓸𝓷𝓷𝓮𝓬𝓽𝓲𝓷𝓰 𝓡𝓮𝓼𝓮𝓪𝓻𝓬𝓱 𝓣𝓸 𝓡𝓮𝓪𝓵𝓲𝓽𝔂" 𝓲𝓼𝓷'𝓽 𝓙𝓾𝓼𝓽 𝓪 𝓜𝓸𝓽𝓽𝓸 - 𝓘𝓽'𝓼 𝓜𝔂 𝓜𝓲𝓼𝓼𝓲𝓸𝓷

Related Posts

The parsimony criterion
BIOINFORMATICS

The Parsimony Criterion in Phylogenetics: Morphological & Molecular Methods

July 15, 2026
maximum-likelihood-criterion
BIOINFORMATICS

Maximum Likelihood Criterion in Phylogenetic Tree Reconstruction

July 15, 2026
Tree Optimization Criteria and Search Methods in Phylogenetics – NNI, SPR, TBR Explained
BIOINFORMATICS

Tree Optimization Criteria and Tree Search Methods in Phylogenetics

July 15, 2026

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I agree to the Terms & Conditions and Privacy Policy.

POPULAR NEWS

Chewing gum releases thousands of microplastic particles directly into your mouth with every piece you chew

Chewing gum releases thousands of microplastic particles directly into your mouth with every piece you chew

by Shibasis Rath
May 8, 2026
0

Microplastics are turning up in places researchers never expected: deep-sea sediments, Arctic ice, and human blood. Now, a UCLA pilot...

grayscale photo of girl in polka dot long sleeve shirt

Yelling Isn’t Just Yelling: How a Hostile Home Rewires a Child’s Brain for Constant Alert

by Shibasis Rath
March 8, 2026
0

To a parent in the heat of the moment, a raised voice may feel like simple frustration. To a child...

72-Hour Fasting Can Reset Your Entire Immune System, USC Study Shows

72-Hour Fasting Can Reset Your Entire Immune System, USC Study Shows

by Shibasis Rath
February 28, 2026
0

A 72-hour fast can trigger a powerful immune system reset. Scientists call this stem cell regeneration. The process clears old...

woman in white tank top lying on bed

New Studys Says Gen Z is the least sexually active young cohort in modern recorded history

by Shibasis Rath
January 24, 2026
0

A generation that grew up with dating apps in their pockets, pornography a tap away, and sex discussed more openly...

a group of gen Z kids walking down a street

Is Gen Z the First Generation Less Intelligent Than Their Parents?

by Shibasis Rath
February 5, 2026
0

Gen Z intelligence decline is emerging as a serious concern among neuroscientists and education researchers. For over a century, each...

EDITOR CHOICE‘S

  • All
  • NEWS
  • SPOTLIGHTS
The parsimony criterion

The Parsimony Criterion in Phylogenetics: Morphological & Molecular Methods

by Shibasis Rath
July 15, 2026
0

The parsimony criterion is one of the oldest and most widely used methods of constructing phylogenetic trees, having its roots...

maximum-likelihood-criterion

Maximum Likelihood Criterion in Phylogenetic Tree Reconstruction

by Shibasis Rath
July 15, 2026
0

The maximum-likelihood (ML) criterion is one of the most important and statistically rigorous approaches used for phylogenetic tree reconstruction, first...

Tree Optimization Criteria and Search Methods in Phylogenetics – NNI, SPR, TBR Explained

Tree Optimization Criteria and Tree Search Methods in Phylogenetics

by Shibasis Rath
July 15, 2026
0

Distance-matrix clustering methods such as UPGMA and Neighbor-Joining construct a phylogenetic tree directly through a fixed, well-defined algorithm, without explicitly...

Bootstrapping in Phylogenetics

Bootstrapping in Phylogenetics – Tree Reliability, Resampling & Bootstrap Values

by Shibasis Rath
July 15, 2026
0

Bootstrapping is a statistical method used to assess the reliability of a phylogenetic tree, introduced by Felsenstein in 1985. Since...

ADVERTISEMENT

RathBiotaClan – RBC

RathBiotaClan – Connecting Research To Reality

Your trusted source for life science news, biology research & discoveries. Covering neuroscience, genetics, ecology, and more — connecting research to reality.

About Us

Privacy Policies

Contact Us

Editorial Standard

Latest Posts

  • The Parsimony Criterion in Phylogenetics: Morphological & Molecular Methods
  • Maximum Likelihood Criterion in Phylogenetic Tree Reconstruction
  • Tree Optimization Criteria and Tree Search Methods in Phylogenetics
  • Bootstrapping in Phylogenetics – Tree Reliability, Resampling & Bootstrap Values

SHIBASIS RATH

Contact Mail

rathbiotaclan@gmail.com

No Result
View All Result
MSME (Udyam) Certified Science Platform
Govt. of India

Get Us On PlayStore

playstore app for rathbiotaclan
  • About Us
  • Advertise With Us
  • Cancellation and Refund Policy
  • Contact Us
  • Contribute
  • Editorial Standards
  • Home
  • Pricing Details
  • Privacy Policies
  • Shipping Policy
  • Terms & Conditions

© 2026 RathBiotaClan. All rights reserved.

Welcome Back!

Sign In with Google
OR

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Sign Up with Google
OR

Fill the forms below to register

*By registering into our website, you agree to the Terms & Conditions and Privacy Policy.
All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In

Add New Playlist

No Result
View All Result
  • HOME
  • HEALTH SCIENCE
  • NEUROSCIENCE
    • PHYSIOLOGY
    • IMMUNOLOGY
    • CANCER
  • DISCOVERIES
    • SPOTLIGHTS
    • STUDENT PORTAL
    • SCIENCE FEATURED
  • MOLECULAR BIOLOGY
    • GENETICS
    • BIOTECHNOLOGY
    • BIOINFORMATICS
    • BIOCHEMISTRY
    • BIOPHYSICS
  • ZOOLOGY & ECOLOGY
    • ENVIRONMENTAL SCIENCE
    • ECOLOGY
    • EVOLUTION
  • MICRO & PLANT SCIENCE
    • MICROBIOLOGY
    • CELL BIOLOGY
    • DEVELOPMENTAL BIOLOGY
  • PSYCHOLOGY
  • Login
  • Sign Up
SAVED POSTS

© 2026 RathBiotaClan. All rights reserved.

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.