Inferensys

Glossary

edgeR

An R/Bioconductor software package for differential expression analysis of digital gene expression data, utilizing empirical Bayes estimation and exact tests based on the negative binomial distribution.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
DIFFERENTIAL EXPRESSION ANALYSIS

What is edgeR?

edgeR is an R/Bioconductor software package for performing differential expression analysis of digital gene expression data using empirical Bayes methods and exact tests based on the negative binomial distribution.

edgeR implements statistical methodology for analyzing digital gene expression data from RNA-seq, ChIP-seq, and other count-based technologies. The package models read counts using a negative binomial distribution to account for both biological and technical variability, employing empirical Bayes shrinkage to stabilize dispersion estimates across genes with low counts. Its core functions include the exact test for simple two-group comparisons and generalized linear models for complex experimental designs.

The package's trimmed mean of M-values (TMM) normalization method corrects for compositional biases in library size, while the quasi-likelihood F-test provides robust error rate control even when the dispersion model is misspecified. edgeR is widely adopted in biomarker discovery pipelines for its statistical rigor in identifying differentially expressed genes between conditions, making it a foundational tool in genomics research alongside DESeq2 and limma-voom.

EMPIRICAL BAYES FOR RNA-SEQ

Key Features of edgeR

edgeR implements a robust statistical framework for differential expression analysis of digital gene expression data, leveraging the negative binomial distribution and empirical Bayes methods to deliver reliable results even with minimal biological replicates.

01

Empirical Bayes Dispersion Estimation

edgeR's core innovation is its use of empirical Bayes shrinkage to estimate gene-specific dispersions. This approach borrows information across all genes to stabilize estimates, particularly for genes with low counts where variability is poorly estimated from data alone.

  • Estimates a common dispersion across all genes
  • Shrinks gene-wise dispersions toward a weighted likelihood empirical Bayes trend
  • Dramatically improves power when biological replicates are limited
  • Uses the quantile-adjusted conditional maximum likelihood (qCML) method for single-factor experiments
02

Exact Test for Two-Group Comparisons

For simple two-group experimental designs, edgeR provides an exact test based on the negative binomial distribution. This test is analogous to Fisher's exact test but adapted for overdispersed count data.

  • Computes exact p-values without asymptotic approximations
  • Models the total count sum as an ancillary statistic
  • Provides reliable Type I error control even at very small sample sizes
  • Suitable for case-vs-control and treated-vs-untreated comparisons
03

Generalized Linear Model Framework

For complex multi-factor experiments, edgeR offers a GLM-based approach that extends its methodology to arbitrary experimental designs. This framework supports additive and interaction models, continuous covariates, and blocking factors.

  • Uses likelihood ratio tests or quasi-likelihood F-tests for hypothesis testing
  • Handles batch effects and paired designs through the design matrix
  • Supports time-course experiments and dose-response studies
  • The quasi-likelihood (QL) pipeline adds an extra dispersion parameter to account for gene-specific variability beyond the negative binomial assumption
04

TMM Normalization Method

edgeR introduced the Trimmed Mean of M-values (TMM) normalization, which corrects for compositional biases in RNA-seq libraries. TMM assumes that the majority of genes are not differentially expressed and computes scaling factors accordingly.

  • Trims genes with extreme log-fold changes (default 30%)
  • Trims genes with extreme absolute expression (default 5%)
  • Produces effective library sizes used as offsets in the model
  • Robust to the presence of highly differentially expressed genes
  • Outperforms simple total-count normalization when library composition varies
05

Gene-Specific Filtering and Testing

edgeR implements intelligent filtering strategies to increase detection power by removing genes that are unlikely to be differentially expressed before multiple testing correction.

  • Filter by expression: Remove genes with consistently low counts across all samples
  • Filter by count-per-million (CPM): Retain genes with a minimum CPM in a sufficient number of samples
  • Reduces the multiple testing burden, increasing the number of discoveries
  • Integrates with the Benjamini-Hochberg procedure for FDR control
  • Provides functions like filterByExpr() for automated, data-driven filtering
06

Multi-Factor and Interaction Testing

The GLM framework in edgeR enables testing of interaction effects and complex contrasts, allowing researchers to answer nuanced biological questions beyond simple two-group comparisons.

  • Test whether treatment effects differ between genotypes (interaction)
  • Compare specific condition combinations using contrast matrices
  • Perform ANOVA-like tests for multi-level factors
  • Extract coefficients and their standard errors for downstream analysis
  • Compatible with the limma package's makeContrasts() function for contrast specification
DIFFERENTIAL EXPRESSION TOOL COMPARISON

edgeR vs. DESeq2 vs. limma-voom

Technical comparison of the three primary Bioconductor packages for RNA-seq differential expression analysis

FeatureedgeRDESeq2limma-voom

Statistical model

Negative binomial GLM

Negative binomial GLM

Linear model on precision-weighted log-CPM

Dispersion estimation method

Empirical Bayes (tagwise)

Empirical Bayes (gene-wise)

Mean-variance trend modeling

Normalization method

TMM (Trimmed Mean of M-values)

Median of ratios (RLE)

TMM or quantile normalization

Handles complex designs

Exact test for two-group comparison

Supports random effects

Default hypothesis test

Likelihood ratio test or quasi-likelihood F-test

Wald test

Moderated t-statistic

Single-cell pseudobulk compatible

EDGER EXPLAINED

Frequently Asked Questions

Clear, technically precise answers to the most common questions about the edgeR package for differential gene expression analysis of digital count data.

edgeR is an R/Bioconductor software package designed for differential expression analysis of digital gene expression data, such as RNA-seq, ChIP-seq, and SAGE. It models count data using the negative binomial distribution to account for both biological and technical variability. The core workflow involves: (1) normalizing raw counts using the Trimmed Mean of M-values (TMM) method to correct for compositional biases between libraries; (2) estimating a common dispersion parameter across all genes, then gene-specific dispersions using an empirical Bayes shrinkage procedure to stabilize estimates for genes with low counts; and (3) fitting a generalized linear model (GLM) and performing exact tests or likelihood ratio tests to identify genes with statistically significant changes between experimental conditions. Unlike older methods that rely on normal approximations, edgeR's negative binomial framework properly handles the mean-variance relationship inherent in count data, where the variance grows quadratically with the mean.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.