{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,23]],"date-time":"2026-10-23T20:50:43Z","timestamp":1792788643175,"version":"4.5.0"},"update-to":[{"DOI":"10.1371\/journal.pcbi.1012747","type":"new_version","label":"New version","source":"publisher","updated":{"date-parts":[[2025,2,20]],"date-time":"2025-02-20T00:00:00Z","timestamp":1740009600000}}],"reference-count":39,"publisher":"Public Library of Science (PLoS)","issue":"2","license":[{"start":{"date-parts":[[2025,2,7]],"date-time":"2025-02-07T00:00:00Z","timestamp":1738886400000},"content-version":"vor","delay-in-days":0,"URL":"http:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/100000026","name":"National Institute on Drug Abuse","doi-asserted-by":"publisher","award":["DP1 DA051608"],"award-info":[{"award-number":["DP1 DA051608"]}],"id":[{"id":"10.13039\/100000026","id-type":"DOI","asserted-by":"publisher"}]},{"DOI":"10.13039\/100000026","name":"National Institute on Drug Abuse","doi-asserted-by":"publisher","award":["R01 DA051652"],"award-info":[{"award-number":["R01 DA051652"]}],"id":[{"id":"10.13039\/100000026","id-type":"DOI","asserted-by":"publisher"}]},{"DOI":"10.13039\/100001391","name":"Whitehall Foundation","doi-asserted-by":"publisher","id":[{"id":"10.13039\/100001391","id-type":"DOI","asserted-by":"publisher"}]},{"name":"McManus Charitable Trust"}],"content-domain":{"domain":["www.ploscompbiol.org"],"crossmark-restriction":false},"short-container-title":["PLoS Comput Biol"],"abstract":"<jats:p>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.<\/jats:p>","DOI":"10.1371\/journal.pcbi.1012747","type":"journal-article","created":{"date-parts":[[2025,2,7]],"date-time":"2025-02-07T13:45:03Z","timestamp":1738935903000},"page":"e1012747","update-policy":"https:\/\/doi.org\/10.1371\/journal.pcbi.corrections_policy","source":"Crossref","is-referenced-by-count":11,"title":["Identifying patterns differing between high-dimensional datasets with generalized contrastive PCA"],"prefix":"10.1371","volume":"21","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-9651-8570","authenticated-orcid":true,"given":"Eliezyer Fermino","family":"de Oliveira","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Pranjal","family":"Garg","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Jens","family":"Hjerling-Leffler","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Renata","family":"Batista-Brito","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-2075-9228","authenticated-orcid":true,"given":"Lucas","family":"Sjulson","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"340","published-online":{"date-parts":[[2025,2,7]]},"reference":[{"issue":"11","key":"pcbi.1012747.ref001","first-page":"559","article-title":"LIII","volume":"2","author":"K Pearson","year":"1901","journal-title":"On lines and planes of closest fit to systems of points in space. The London, Edinburgh, and Dublin Philosophical Magazine J Sci"},{"issue":"6","key":"pcbi.1012747.ref002","doi-asserted-by":"crossref","first-page":"417","DOI":"10.1037\/h0071325","article-title":"Analysis of a complex of statistical variables into principal components","volume":"24","author":"H Hotelling","year":"1933","journal-title":"J Educ Psychol."},{"issue":"2","key":"pcbi.1012747.ref003","doi-asserted-by":"crossref","first-page":"265","DOI":"10.1198\/106186006X113430","article-title":"Sparse Principal Component Analysis","volume":"15","author":"H Zou","year":"2006","journal-title":"J Comput Graph Stat."},{"key":"pcbi.1012747.ref004","first-page":"1561","article-title":"Nonnegative Sparse PCA","author":"R Zass","year":"2006","journal-title":"Adv Neural Inf Process Syst."},{"issue":"3","key":"pcbi.1012747.ref005","doi-asserted-by":"crossref","first-page":"611","DOI":"10.1111\/1467-9868.00196","article-title":"Probabilistic principal component analysis","volume":"61","author":"M Tipping","year":"1999","journal-title":"J R Stat Soc Series B Stat Methodol."},{"issue":"1","key":"pcbi.1012747.ref006","doi-asserted-by":"crossref","first-page":"121","DOI":"10.1016\/S0165-0270(99)00130-2","article-title":"Principal component analysis of neuronal ensemble activity reveals multidimensional somatosensory representations","volume":"94","author":"JK Chapin","year":"1999","journal-title":"J Neurosci Methods"},{"key":"pcbi.1012747.ref007","doi-asserted-by":"crossref","unstructured":"Peyrache A, Benchenane K, Khamassi M, Wiener SI, Battaglia FP. Principal component analysis of ensemble recordings reveals cell assemblies at high temporal resolution. J Comput Neurosci. 2010;29(1\u20132):309\u201325. doi: 10.1007\/s10827-009-0154-6 19529888","DOI":"10.1007\/s10827-009-0154-6"},{"issue":"2","key":"pcbi.1012747.ref008","doi-asserted-by":"crossref","first-page":"149","DOI":"10.1016\/j.jneumeth.2013.04.010","article-title":"Detecting cell assemblies in large neuronal populations","volume":"220","author":"V Lopes-dos-Santos","year":"2013","journal-title":"J Neurosci Methods"},{"key":"pcbi.1012747.ref009"},{"issue":"4","key":"pcbi.1012747.ref010","doi-asserted-by":"crossref","first-page":"545","DOI":"10.1093\/bioinformatics\/btu674","article-title":"Statistical significance of variables driving systematic variation in high-dimensional data","volume":"31","author":"NC Chung","year":"2015","journal-title":"Bioinformatics"},{"issue":"2","key":"pcbi.1012747.ref011","doi-asserted-by":"crossref","first-page":"178","DOI":"10.15252\/embr.201540946","article-title":"Single-cell transcriptomes reveal characteristic features of human pancreatic islet cell types","volume":"17","author":"J Li","year":"2016","journal-title":"EMBO Rep"},{"key":"pcbi.1012747.ref012","doi-asserted-by":"crossref","DOI":"10.1007\/978-0-387-78189-1","volume-title":"Modern Multivariate Statistical Techniques: Regression, Classification, and Manifold Learning","author":"AJ Izenman","year":"2008"},{"issue":"4","key":"pcbi.1012747.ref013","doi-asserted-by":"crossref","first-page":"213","DOI":"10.1002\/cem.2609","article-title":"Partial least squares discriminant analysis: taking the magic away","volume":"28","author":"RG Brereton","year":"2014","journal-title":"J Chemom"},{"issue":"1","key":"pcbi.1012747.ref014","doi-asserted-by":"crossref","first-page":"2134","DOI":"10.1038\/s41467-018-04608-8","article-title":"Exploring patterns enriched in a dataset with contrastive principal component analysis","volume":"9","author":"A Abid","year":"2018","journal-title":"Nat Commun"},{"issue":"11","key":"pcbi.1012747.ref015","doi-asserted-by":"crossref","first-page":"3422","DOI":"10.1093\/bioinformatics\/btaa176","article-title":"Exploring high-dimensional biological data with sparse contrastive principal component analysis","volume":"36","author":"P Boileau","year":"2020","journal-title":"Bioinformatics."},{"key":"pcbi.1012747.ref016","unstructured":"Erichson NB, Zheng P, Manohar K, Brunton SL, Kutz JN, Aravkin AY. Sparse principal component analysis via variable projection. arXiv [statML]. 2018;."},{"issue":"4","key":"pcbi.1012747.ref017","doi-asserted-by":"crossref","first-page":"1122","DOI":"10.3758\/s13428-014-0532-5","article-title":"The Chicago face database: A free stimulus set of faces and norming data","volume":"47","author":"DS Ma","year":"2015","journal-title":"Behav Res Methods"},{"key":"pcbi.1012747.ref021","doi-asserted-by":"crossref","unstructured":"Turk M, Pentland A. Eigenfaces for recognition. J Cogn Neurosci. 1991. 1991;3(1):71\u201386.","DOI":"10.1162\/jocn.1991.3.1.71"},{"key":"pcbi.1012747.ref022","doi-asserted-by":"crossref","unstructured":"de Oliveira EF, Kim S, Qiu TS, Peyrache A, Batista-Brito R, Sjulson L. Off-manifold coding in visual cortex revealed by sleep. bioRxiv. 2022; p. 2022.06.10.495710.","DOI":"10.1101\/2022.06.10.495710"},{"issue":"7679","key":"pcbi.1012747.ref023","doi-asserted-by":"crossref","first-page":"232","DOI":"10.1038\/nature24636","article-title":"Fully integrated silicon probes for high-density recording of neural activity","volume":"551","author":"JJ Jun","year":"2017","journal-title":"Nature"},{"issue":"5172","key":"pcbi.1012747.ref024","doi-asserted-by":"crossref","first-page":"676","DOI":"10.1126\/science.8036517","article-title":"Reactivation of hippocampal ensemble memories during sleep","volume":"265","author":"MA Wilson","year":"1994","journal-title":"Science"},{"issue":"1","key":"pcbi.1012747.ref025","doi-asserted-by":"crossref","first-page":"581","DOI":"10.1146\/annurev-neuro-072116-031538","article-title":"Replay comes of age","volume":"40","author":"DJ Foster","year":"2017","journal-title":"Annu Rev Neurosci."},{"key":"pcbi.1012747.ref018","doi-asserted-by":"crossref","unstructured":"Girardeau G, Inema I, Buzs\u00e1ki G. Reactivations of emotional memory in the hippocampus\u2013amygdala system during sleep. Nature Neuroscience. 2018. 2017;20(11):1634\u201342.","DOI":"10.1038\/nn.4637"},{"issue":"10","key":"pcbi.1012747.ref026","doi-asserted-by":"crossref","first-page":"4090","DOI":"10.1523\/JNEUROSCI.19-10-04090.1999","article-title":"Reactivation of hippocampal cell assemblies: effects of behavioral state, experience, and EEG dynamics","volume":"19","author":"HS Kudrimoti","year":"1999","journal-title":"J Neurosci"},{"key":"pcbi.1012747.ref020","doi-asserted-by":"crossref","unstructured":"Mart\u00ednez-L\u00f3pez JA, Lindqvist A, Lopez-Pascual A, Chen P, Shcherbina L, Chriett S, et al. Single-cell mRNA-regulation analysis reveals cell type-specific mechanisms of type 2 diabetes. bioRxiv. 2023; p. 2023.03.23.533985.","DOI":"10.1101\/2023.03.23.533985"},{"key":"pcbi.1012747.ref027","doi-asserted-by":"crossref","unstructured":"Tang Q, Shi W, Liu M, Tang L, Ren W, Shi S. Mitochondrial protein MPV17 promotes \u03b2-cell apoptosis in diabetogenesis. Clin Sci (Lond).2023;137(15):1195\u2013208.","DOI":"10.1042\/CS20230164"},{"issue":"12","key":"pcbi.1012747.ref028","doi-asserted-by":"crossref","first-page":"2740","DOI":"10.1007\/s00125-024-06261-x","article-title":"Implicating type 2 diabetes effector genes in relevant metabolic cellular models using promoter-focused Capture-C","volume":"67","author":"NA Wachowski","year":"2024","journal-title":"Diabetologia"},{"key":"pcbi.1012747.ref029","doi-asserted-by":"crossref","unstructured":"Li J, Inoue R, Togashi Y, Okuyama T, Satoh A, Kyohara M, et al. Imeglimin Ameliorates \u03b2-cell apoptosis by modulating the endoplasmic reticulum homeostasis pathway. Diabetes. 2022;71(3):424\u201339. doi: 10.2337\/db21-0123 34588186","DOI":"10.2337\/db21-0123"},{"key":"pcbi.1012747.ref030","doi-asserted-by":"crossref","unstructured":"Yong J, Parekh VS, Reilly SM, Nayak J, Chen Z, Lebeaupin C, et al. Chop\/Ddit3 depletion in \u03b2 cells alleviates ER stress and corrects hepatic steatosis in mice. Sci Transl Med. 2021;13(604):eaba9796. doi: 10.1126\/scitranslmed.aba9796 34321322","DOI":"10.1126\/scitranslmed.aba9796"},{"key":"pcbi.1012747.ref031"},{"issue":"4","key":"pcbi.1012747.ref032","doi-asserted-by":"crossref","first-page":"235","DOI":"10.1530\/JME-20-0031","article-title":"Pancreatic islet beta cell-specific deletion of G6pc2 reduces fasting blood glucose","volume":"64","author":"KJ Bosma","year":"2020","journal-title":"J Mol Endocrinol"},{"issue":"8","key":"pcbi.1012747.ref033","doi-asserted-by":"crossref","first-page":"112952","DOI":"10.1016\/j.celrep.2023.112952","article-title":"A transcriptomic and proteomic atlas of obesity and type 2 diabetes in cynomolgus monkeys","volume":"42","author":"X Zhang","year":"2023","journal-title":"Cell Rep"},{"issue":"10","key":"pcbi.1012747.ref034","doi-asserted-by":"crossref","first-page":"2086","DOI":"10.2337\/dbi20-0001","article-title":"Subtypes of Type 2 Diabetes Determined From Clinical Parameters","volume":"69","author":"E Ahlqvist","year":"2020","journal-title":"Diabetes"},{"issue":"11","key":"pcbi.1012747.ref035","doi-asserted-by":"crossref","first-page":"1612","DOI":"10.1016\/j.stem.2024.08.007","article-title":"Human vascularized macrophage-islet organoids to model immune-mediated pancreatic \u03b2 cell pyroptosis upon viral infection","volume":"31","author":"L Yang","year":"2024","journal-title":"Cell Stem Cell"},{"issue":"5","key":"pcbi.1012747.ref036","doi-asserted-by":"crossref","first-page":"1251","DOI":"10.1210\/me.2007-0500","article-title":"Trefoil factor 3 stimulates human and rodent pancreatic islet beta-cell replication with retention of function","volume":"22","author":"PT Fueger","year":"2008","journal-title":"Mol Endocrinol"},{"key":"pcbi.1012747.ref037","unstructured":"Diabetes Genetics Initiative of Broad Institute of Harvard and MIT, Lund University, and Novartis Institutes of BioMedical Research, Saxena R, Voight BF, Lyssenko V, Burtt NP, de Bakker PIW, et al. Genome-wide association analysis identifies loci for type 2 diabetes and triglyceride levels. Science.2007;316(5829):1331\u20136."},{"key":"pcbi.1012747.ref038","doi-asserted-by":"crossref","unstructured":"Cataldo LR, Vishnu N, Singh T, Bertonnier-Brouty L, Bsharat S, Luan C. The MafA-target gene PPP1R1A regulates GLP1R-mediated amplification of glucose-stimulated insulin secretion in \u03b2-cells. Metabolism. 2021;118(154734):154734.","DOI":"10.1016\/j.metabol.2021.154734"},{"issue":"4","key":"pcbi.1012747.ref039","doi-asserted-by":"crossref","first-page":"1022","DOI":"10.1016\/j.bbrc.2019.11.117","article-title":"Role of Tmem163 in zinc-regulated insulin storage of MIN6 cells: Functional exploration of an Indian type 2 diabetes GWAS associated gene","volume":"522","author":"S Chakraborty","year":"2020","journal-title":"Biochem Biophys Res Commun"},{"key":"pcbi.1012747.ref019","unstructured":"Petersen PC, Hernandez M, Buzs\u00e1ki G. The Buzsaki Lab Databank - Public electrophysiological datasets from awake animals. 2020."}],"updated-by":[{"DOI":"10.1371\/journal.pcbi.1012747","type":"new_version","label":"New version","source":"publisher","updated":{"date-parts":[[2025,2,20]],"date-time":"2025-02-20T00:00:00Z","timestamp":1740009600000}}],"container-title":["PLOS Computational Biology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dx.plos.org\/10.1371\/journal.pcbi.1012747","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,2,20]],"date-time":"2025-02-20T13:43:20Z","timestamp":1740059000000},"score":1,"resource":{"primary":{"URL":"https:\/\/dx.plos.org\/10.1371\/journal.pcbi.1012747"}},"subtitle":[],"editor":[{"given":"Stefano","family":"Panzeri","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"editor"}]}],"short-title":[],"issued":{"date-parts":[[2025,2,7]]},"references-count":39,"journal-issue":{"issue":"2","published-online":{"date-parts":[[2025,2,7]]}},"URL":"https:\/\/doi.org\/10.1371\/journal.pcbi.1012747","relation":{"has-preprint":[{"id-type":"doi","id":"10.1101\/2024.08.08.607264","asserted-by":"object"}]},"ISSN":["1553-7358"],"issn-type":[{"value":"1553-7358","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,2,7]]}}}