pyreml: a general-purpose, GPU-accelerated mixed model solver in Python
Alexandre MarchaliD, Catherine Trottier, Xavier BryiD, Daniele RaimondiiD
Abstract
Linear mixed models (LMM) are a popular modeling and inference framework, widely used in bioinformatics and other scientific fields. To obtain an unbiased estimation of the variance components, an LMM has to be fitted using restricted maximum likelihood (REML), a computationally intensive step. Most REML software is closed source, and currently there is no Python library offering complete LMM functionalities, such as the specification of spatial and genomic variance structures, multivariate analyses, random regression and factors, and heteroscedastic residuals. Here we propose pyreml, an LMM solver that fills this gap, comes with a user-centered interface and speeds up calculations by running on GPU. We show that pyreml fits a genomic best linear unbiased prediction (GBLUP) model more than one order of magnitude (>12\times) faster than the current state-of-the-art, closed source REML software. We also show that \pyreml can estimate a latent factor-analytic variance structure, a challenging feature that no current open source REML solution implements. Finally, we illustrate the use of pyreml to analyze longitudinal data, and to perform spatial analysis. Anchored by 500+ functional tests assessing the equivalence of its outputs to those from reference software (lme4, rrBLUP and BLUPF90), we demonstrate pyreml to be a performant, reliable and open-source solution available for academic, research and industrial LMM users.
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 0
- Research Focus
- Approach
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
- Stochastic Lanczos estimation of genomic variance components for linear mixed-effects models
Richard Border, Stephen Becker·BMC BioinformaticsPeer-reviewed·Jul 30, 2019
- REHE: Fast Variance Components Estimation for Linear Mixed Models
Kun Yue, Jing Ma, … Ali Shojaie·Genetic EpidemiologyPeer-reviewed·Oct 17, 2021
- Fast phylogenetic generalised linear mixed-effects modelling using the glmmTMB R package
Coralie Williams, Maeve McGillycuddy, … Shinichi Nakagawa·bioRxiv·Feb 4, 2026
- sdmTMB: an R package for fast, flexible, and user-friendly generalized linear mixed effects models with spatial and spatiotemporal random fields
S. C. Anderson, E. J. Ward, … J. T. Thorson·bioRxiv·Mar 24, 2022
- Parallel Likelihood Calculation for Phylogenetic Comparative Models: the SPLITT C++ Library
V. Mitov, T. Stadler·bioRxiv·Oct 29, 2018
- lme4breeding: a fast linear mixed model for multi-trait/multi-environment experiments
Giovanny E. Covarrubias-Pazaran·bioRxiv·May 17, 2024