Abstract
The increasing availability of single-cell data revolutionizes the understanding of biological mechanisms at cellular resolution. For differential expression analysis in multi-subject single-cell data, negative binomial mixed models account for both subject-level and cell-level overdispersions, but are computationally demanding. Here, we propose an efficient NEgative Binomial mixed model Using a Large-sample Approximation (NEBULA). The speed gain is achieved by analytically solving high-dimensional integrals instead of using the Laplace approximation. We demonstrate that NEBULA is orders of magnitude faster than existing tools and controls false-positive errors in marker gene identification and co-expression analysis. Using NEBULA in Alzheimer's disease cohort data sets, we found that the cell-level expression of APOE correlated with that of other genetic risk factors (including CLU, CST3, TREM2, C1q, and ITM2B) in a cell-type-specific pattern and an isoform-dependent manner in microglia. NEBULA opens up a new avenue for the broad application of mixed models to large-scale multi-subject single-cell data.
Introduction
Modern single-cell RNA sequencing (scRNA-seq) experiments have evolved from analyzing single samples to profiling tens of thousands of cells across dozens or even hundreds of human subjects. This shift introduces a hierarchical data structure: cells are nested within subjects. Analyzing such data as if every cell were independent is a statistical pitfall; it ignores patient-to-patient biological variation, leading to a massive influx of false positives (Type I errors).
The statistically rigorous solution is the Negative Binomial Mixed Model (NBMM). By accounting for overdispersion at both the cell and subject levels, NBMMs provide accurate results. However, their computational cost is prohibitive. Standard implementations require solving complex, high-dimensional integrals through iterative optimization, which can turn a standard analysis into a week-long compute job.
Methods: The NEBULA Approach
To overcome this bottleneck, the authors developed NEBULA (NEgative Binomial mixed model Using a Large-sample Approximation). NEBULA shifts the paradigm by leveraging a characteristic of modern scRNA-seq: the large number of cells sequenced per subject.
By assuming a large cell count, NEBULA derives an analytical, closed-form approximation of the marginal likelihood, termed NEBULA-LN. This mathematical shortcut allows the algorithm to skip the slow two-layer optimization process entirely. For scenarios where cell counts are low or subject-level variance is minimal, the tool utilizes a streamlined hierarchical likelihood method (NEBULA-HL) to maintain accuracy.
The framework was validated using a combination of simulated data and large-scale real-world datasets, including a ~70,000 cell Human PBMC dataset and two Alzheimer’s disease (AD) brain cohorts totaling nearly 200,000 nuclei.
Key Results
Unprecedented Computational Efficiency
The primary advantage of NEBULA is its speed. In comparative benchmarks, NEBULA proved to be over 100-fold faster than standard tools like glmer.nb. For instance, in an analysis of ~34,000 neurons across 48 subjects, NEBULA processed 16,000 genes in just 40 minutes—a task that took standard methods approximately 67 hours.
Importantly, this speed does not come at the cost of precision. NEBULA maintains strict control over false-positive rates, matching the performance of much slower gold-standard NBMMs in marker gene identification and differential expression tasks.
Biological Discovery: The Multi-faceted Role of APOE
Applying NEBULA to Alzheimer's disease datasets yielded significant biological insights. The tool's robust co-expression analysis revealed that the APOE gene—a major genetic risk factor for AD—exhibits cell-type-specific behavior.
- In astrocytes, APOE co-expresses with genes like CLU that regulate amyloid-beta production.
- In microglia, it interacts with immune and complement system genes, such as TREM2 and C1q.
Furthermore, NEBULA identified that these microglial co-expression patterns are isoform-dependent, varying based on whether a patient carries the APOE e2/e3 or e4 allele.
Discussion and Limitations
While NEBULA represents a major leap forward, some limitations remain. In studies with very small subject cohorts (e.g., fewer than 30 individuals), mixed models can sometimes underestimate subject-level variance, potentially inflating false positives for subject-level predictors. Additionally, the extreme sparsity of scRNA-seq data means that very lowly expressed genes may still lack the statistical power required for confident co-expression detection.
Despite these caveats, NEBULA’s mathematical framework is highly adaptable. Its ability to handle sparse, large-scale data makes it a prime candidate for extension into other single-cell modalities, such as scATAC-seq, ensuring that mixed models remain a viable tool as the scale of biological data continues to explode.
Summary updated