Skip to content

Article image
Clustering in Bioinformatics: Uncovering Natural Groups

May 16, 2026 · Updated: May 25, 2026

Overview

Clustering is an unsupervised learning technique that partitions a set of objects into groups such that objects within the same cluster are more similar to each other than to those in other clusters. In bioinformatics, clustering addresses exploratory questions where ground-truth labels do not exist: discovering new disease subtypes, identifying co-expressed gene modules, or detecting microbial community structures. The quality of clustering depends critically on the chosen similarity measure and algorithm, and results require biological validation rather than purely statistical metrics.

Methods

K-means partitions data into a predefined number of clusters by minimizing within-cluster variance and is fast and scalable but assumes spherical clusters. Hierarchical clustering builds a dendrogram of nested groupings using agglomerative or divisive strategies, with the advantage that the number of clusters can be chosen after inspection. DBSCAN identifies clusters as dense regions separated by sparse areas and handles arbitrary shapes while detecting outliers. Gaussian mixture models provide probabilistic cluster assignments and can capture clusters with different sizes and orientations. For high-dimensional data, clustering is often preceded by dimensionality reduction. Internal validation indices such as silhouette score and external measures such as adjusted Rand index quantify cluster quality when ground truth is available.

Practical Protocol

A practical clustering workflow begins with a normalized gene expression matrix of N samples by P genes. The researcher first applies PCA to reduce dimensionality to the top 20 principal components, which denoises the data and accelerates downstream computation. For hierarchical clustering, a distance matrix is computed using Euclidean distance, and Ward’s linkage method minimizes within-cluster variance when merging branches. The dendrogram is inspected to decide the number of clusters, looking for large vertical distances between merges as natural cut points. The silhouette score is computed for k from 2 to 10 to validate the choice, the optimal k maximizes the average silhouette width. For k-means clustering, the algorithm is run with 20 random initializations to avoid local minima, and the solution with the lowest within-cluster sum of squares is selected. Results are visualized via a heatmap with row and column dendrograms, or projected onto a UMAP embedding colored by cluster assignment. Biological validation follows: differentially expressed genes between clusters are identified using a Wilcoxon rank-sum test, and the top markers are cross-referenced against known cell type signatures from databases such as PanglaoDB or CellMarker. A concrete example comes from The Cancer Genome Atlas (TCGA), where consensus clustering of 5,000 tumor samples across 33 cancer types identified novel molecular subtypes with distinct survival outcomes. In single-cell studies, clustering of 50,000 cells from Alzheimer’s disease brain samples revealed a novel population of disease-associated microglia with a unique transcriptional signature linked to neurodegeneration.

Applications

Clustering identifies cancer subtypes from DNA microarrays and gene expression profiles, gates cell populations in flow cytometry data, and defines operational taxonomic units in microbial community profiling from bacterial genetics studies. It also reveals functional modules in protein-protein interaction networks and groups patients by molecular signatures for personalized treatment strategies.