PLoS Computational BiologyNeurosciencePeer-reviewed journal article
Identifying patterns differing between high-dimensional datasets with generalized contrastive PCA
Eliezyer Fermino de OliveiraiD, Pranjal GargiD, Jens Hjerling‐LeffleriD, Renata Batista‐BritoiD, Lucas SjulsoniD
Abstract
High-dimensional data have become ubiquitous in the biological sciences, and it is often desirable to compare two datasets collected under different experimental conditions to extract low-dimensional patterns enriched in one condition. However, traditional dimensionality reduction techniques cannot accomplish this because they operate on only one dataset. Contrastive principal component analysis (cPCA) has been proposed to address this problem, but it has seen little adoption because it requires tuning a hyperparameter resulting in multiple solutions, with no way of knowing which is correct. Moreover, cPCA uses foreground and background conditions that are treated differently, making it ill-suited to compare two experimental conditions symmetrically. Here we describe the development of generalized contrastive PCA (gcPCA), a flexible hyperparameter-free approach that solves these problems. We first provide analyses explaining why cPCA requires a hyperparameter and how gcPCA avoids this requirement. We then describe an open-source gcPCA toolbox containing Python and MATLAB implementations of several variants of gcPCA tailored for different scenarios. Finally, we demonstrate the utility of gcPCA in analyzing diverse high-dimensional biological data, revealing unsupervised detection of hippocampal replay in neurophysiological recordings and heterogeneity of type II diabetes in single-cell RNA sequencing data. As a fast, robust, and easy-to-use comparison method, gcPCA provides a valuable resource facilitating the analysis of diverse high-dimensional datasets to gain new insights into complex biological phenomena.
- organism: human
- organism: mouse
- assay: bulk RNA-seq
- assay: spatial transcriptomics
- research focus: clustering
- research focus: differential expression
- research focus: benchmarking
- approach: contrastive learning
- Citations
- 9
- FWCI
- 8.52
- Field percentile
- top 2%
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Exploring High-Dimensional Biological Data with Sparse Contrastive Principal Component Analysis
Philippe Boileau, Nima S. Hejazi, Sandrine Dudoit·BioinformaticsPeer-reviewed·Mar 10, 2020
- The Rayleigh Quotient and Principal Component Analysis I
Maria Carilli, Kayla C. Jackson, Lior S. Pachter·bioRxiv·Nov 19, 2025
- The Rayleigh Quotient and Contrastive Principal Component Analysis II
Kayla C. Jackson, Maria Carilli, Lior S. Pachter·bioRxiv·Apr 10, 2026
- Differential Principal Components Reveal Patterns of Differentiation in Case/Control Studies
Benjamin J. Lengerich, Eric P. Xing·bioRxiv·Feb 10, 2019
- Discriminant Analysis of Principle Component analyses of Physiological Data.
O. Haidar, S. T. M. Ball, R. Barrett-Jolley·bioRxiv·Jan 9, 2020
- PCA-Plus: Enhanced principal component analysis with illustrative applications to batch effects and their quantitation
Nianxiang Zhang, Tod D. Casasent, … Rehan Akbani·bioRxiv·Jan 2, 2024