TL;DR
This paper introduces apeglm, a significantly faster and more numerically reliable R package for analyzing allelic imbalance (AI) in gene expression. By employing Bayesian shrinkage methods, apeglm improves the accuracy of AI estimates, especially in challenging scenarios with low read counts and small sample sizes, outperforming traditional methods and other existing software.
What Problem Does This Paper Address?
Gene expression isn't always equal between the two copies (alleles) of a gene in a diploid organism. This "allelic imbalance" (AI) can reveal crucial information about gene regulation and epigenetic differences. However, accurately measuring AI is tricky when dealing with limited data – specifically, a small number of sequencing reads or samples. This scarcity leads to high variability in AI estimates, making it hard to distinguish true biological differences from statistical noise. Traditional approaches often involve filtering out genes with insufficient data, which risks discarding genuinely interesting genes with strong AI. Alternatively, adding "pseudocounts" or using Bayesian methods can help stabilize estimates. This paper tackles the challenge of providing accurate, reliable, and computationally efficient AI estimation, particularly for these difficult low-data scenarios.
Methods
The authors compare four estimation methods for allelic expression proportions:
- Maximum Likelihood (ML): A standard statistical approach that estimates parameters to maximize the probability of observing the data.
- ML with Pseudocounts: ML estimation after adding a small, artificial count to each allele and sample to improve stability.
apeglm(Approximate Posterior Estimation of GLM Coefficients): A Bayesian shrinkage method that uses a Cauchy prior to "shrink" ML estimates towards a common value, particularly effective for moderating estimates from noisy data. The authors developed a C++ implementation for faster computation.ash(Adaptive Shrinkage): Another Bayesian shrinkage method that uses a more flexible prior and a normal approximation to the likelihood.
The core innovation lies in the optimized C++ implementation of apeglm, making it significantly faster and more robust for fitting beta-binomial generalized linear models (GLMs), which are well-suited for modeling proportions with overdispersion.
Datasets
The study utilizes two simulated datasets and one real dataset:
- Simulations:
- Normal Simulation: Allelic counts generated from beta-binomial distributions with effect sizes drawn from a standard normal distribution.
- Student's t Simulation: Similar to the normal simulation but with effect sizes drawn from a Student's t-distribution (scaled) to better mimic scenarios where most effects are small but some are large.
- Real Data:
- Mouse Data Set: Data from an allelic expression study involving mice from three divergent inbred strains, with RNA-seq data generated from a diallel cross. This dataset was used for evaluating performance on real-world data.
Key Insights and Ideas
- Bayesian Shrinkage is Key: Bayesian shrinkage methods like
apeglmandashconsistently outperform standard Maximum Likelihood (ML) estimation, especially when dealing with low read counts and small sample sizes. They effectively moderate noisy estimates. apeglm's Computational Edge: The C++ implementation ofapeglmoffers a substantial speedup over other beta-binomial GLM packages, making it practical for large-scale analyses.- The Challenge of Infinite MLEs: When all reads for a gene consistently support one allele, ML estimates can become infinite (or numerically very large), causing issues for downstream methods like
ash. Adding pseudocounts is a simple yet effective way to stabilize these estimates. - Real Data vs. Simulations: The authors found that real data exhibited characteristics (like the presence of infinite MLEs) that differed from their initial simulations, highlighting the importance of careful real-data analysis and robust methods.
Key Results
- Accuracy:
apeglmconsistently showed lower Mean Absolute Error (MAE) and better Concordance at the Top (CAT) scores across simulations compared to ML. In the Student's t simulation, bothapeglmandashsignificantly improved upon ML. - Speed: The optimized
apeglmpackage was substantially faster than five other R packages capable of fitting beta-binomial models, with computation times scaling well with the number of covariates. For example,apeglmwas up to 27 times faster thanaodfor ML estimation. - Numerical Reliability:
apeglmdemonstrated superior numerical accuracy and reliability, successfully converging in all tested scenarios where other packages sometimes failed. - Shrinkage Behavior: Both
apeglmandashprimarily shrunk genes with low counts or inflated ML estimates.ashtended to shrink more aggressively thanapeglm, sometimes over-shrinking large effects.
Limitations and Future Work
- Unmodeled Complications: The current
apeglmmodel does not explicitly account for complexities like multiple heterozygous variants within a gene or different isoforms, which other methods (e.g., MMDIFF) address. The authors acknowledge this limitation and suggest future work could incorporate these factors. - Reference Allele Bias: The methods do not directly handle reference allele bias, a known issue in RNA-seq analysis. While their study design avoided this, future work could explore methods to mitigate it.
- Prior Flexibility: While
apeglmuses a Cauchy prior, the authors note that other priors might be more suitable in specific scenarios (e.g., for detecting sparsity). They suggest that the software's flexibility to handle different priors could be further explored. - Computational Improvements: While coefficient estimation is in C++, integrating overdispersion and posterior standard error calculations into C++ could further enhance computational performance.
Summary updated