- Differential gene expression analysis is a fundamental computational approach in bioinformatics used to identify genes whose expression levels differ significantly between biological conditions, experimental treatments, tissues, developmental stages, or disease states. RNA sequencing (RNA-seq) provides genome-wide measurements of gene expression by generating millions of sequencing reads from RNA molecules. After sequencing, quality control, alignment or transcript quantification, and gene-level counting, the resulting data are analyzed statistically to identify genes showing changes in expression between experimental groups. Differential expression analysis helps researchers understand biological responses, identify molecular pathways, discover candidate genes, and investigate the genetic mechanisms underlying complex traits.
- In RNA-seq experiments, gene expression is generally represented by a count matrix in which rows correspond to genes and columns correspond to biological samples. Each entry represents the number of sequencing reads or fragments assigned to a particular gene in a sample. These raw counts are influenced by sequencing depth, RNA composition, technical variation, and biological differences between samples. Therefore, statistical methods must account for differences in library size and other sources of variation before comparing gene expression. Unlike simple comparisons of TPM, RPKM, or FPKM values, modern differential expression methods use count-based statistical models that account for the discrete nature and variability of RNA-seq data.
- Three widely used approaches for differential expression analysis are DESeq2, edgeR, and limma-voom. DESeq2 uses negative binomial statistical models and median-of-ratios normalization to estimate gene expression differences. edgeR also uses negative binomial models but commonly applies trimmed mean of M-values (TMM) normalization. Limma-voom transforms count data into log-counts per million and estimates the mean-variance relationship to enable linear modelling with precision weights. All three methods are widely used in transcriptomics and provide statistical frameworks for identifying differentially expressed genes.
- The general workflow begins with the preparation of a gene expression count matrix. Reads are obtained from RNA-seq data after sequencing quality control and alignment to a reference genome or transcriptome. Tools such as STAR, HISAT2, and Subread can be used for alignment and gene-level quantification, while featureCounts and HTSeq-count generate gene-level read counts. Transcript quantification tools such as Salmon and Kallisto can also produce abundance estimates that may be summarized at gene level using tximport. The count matrix is then combined with sample metadata describing experimental groups, biological replicates, treatments, tissues, batches, and other relevant variables.
- Before statistical testing, lowly expressed genes are commonly filtered because genes with extremely low counts provide little information for estimating expression differences and can reduce statistical power. Quality control is performed to identify unusual samples, possible batch effects, and inconsistencies in expression profiles. Common approaches include library-size assessment, sample correlation analysis, principal component analysis (PCA), multidimensional scaling (MDS), and visualization of count distributions. These steps help determine whether samples cluster according to biological conditions or whether technical factors influence the data.
- DESeq2 is an R and Bioconductor package designed for differential expression analysis of RNA-seq count data. It models gene counts using the negative binomial distribution, which accounts for both the mean expression level and biological variability among samples. Negative binomial modelling is particularly suitable for RNA-seq because biological replicate counts often show greater variability than would be expected under a simple Poisson distribution.
- The negative binomial distribution is commonly expressed as:
- Kij ~ NB(μij, ⍺i)
- Here,
- Kij represents the observed count for gene i in sample j, ij represents its expected count, and i represents the gene-specific dispersion parameter. Dispersion measures the variability of gene expression beyond the variation expected from sequencing counts alone.
- DESeq2 estimates size factors to normalize differences in sequencing depth and certain forms of RNA composition. It uses the median-of-ratios method, in which the counts for each gene are compared with the geometric mean of that gene across samples. The size factor for sample j is calculated as the median of the ratios between observed counts and the corresponding gene-specific geometric means.
- sj = MEDIANi(Kij / GMi)
- Here,
- sj represents the size factor for sample j, Kij represents the raw count for gene i in sample j, and GMi represents the geometric mean count for gene i across the samples. Genes with zero counts in any sample are excluded from the standard geometric-mean calculation.
- After normalization, DESeq2 estimates gene-specific dispersion values and fits negative binomial generalized linear models. The expected count is modelled using the sample-specific size factor and the expression level associated with the experimental design. Differential expression is assessed by testing whether the estimated expression coefficients differ from zero. For a simple comparison between two groups, the log2 fold change represents the estimated expression difference on a base-2 logarithmic scale.
- log2(FC) = LOG2(μtreated / μcontrol)
- A positive log2 fold change indicates higher expression in the treated group, whereas a negative value indicates lower expression relative to the control group. For example, a log2 fold change of 1 represents an estimated twofold increase, while a value of -1 represents an estimated twofold decrease.
- DESeq2 commonly uses Wald tests to assess individual model coefficients and likelihood ratio tests to compare nested models. It calculates p-values and adjusts them for multiple hypothesis testing using the Benjamini–Hochberg procedure to control the false discovery rate (FDR). Genes with adjusted p-values below a selected threshold, often 0.05, may be considered statistically significant, depending on the research design and interpretation criteria. DESeq2 also provides functions for shrinkage of log2 fold-change estimates, helping stabilize estimates for genes with low counts or high uncertainty.
- edgeR is another widely used Bioconductor package for differential expression analysis of RNA-seq data. It uses negative binomial generalized linear models and provides methods for estimating dispersion, normalizing library sizes, fitting statistical models, and testing differential expression. One of its important normalization methods is the Trimmed Mean of M-values (TMM) method, which adjusts for differences in sequencing depth and RNA composition.
- TMM calculates scaling factors by comparing expression profiles between samples. It uses log-fold changes and average expression levels for genes shared between samples, trims extreme observations, and estimates normalization factors from the remaining genes. These factors are applied to the original library sizes to calculate effective library sizes.
- NjEffective = Nj * fj
- Here,
- Nj represents the original library size of sample j, and fj represents its TMM normalization factor. The effective library size is used during statistical modelling to account for sequencing depth and compositional differences.
- edgeR estimates gene-specific dispersion values and fits negative binomial models to the observed count data. It supports both exact tests for simple experimental designs and generalized linear model approaches for more complex comparisons involving multiple conditions, batches, covariates, and interactions. The package provides likelihood ratio tests and quasi-likelihood F-tests. Quasi-likelihood methods account for uncertainty in dispersion estimation and are often recommended for robust inference in multifactor RNA-seq experiments.
- limma-voom combines the limma linear modelling framework with the voom transformation, allowing RNA-seq count data to be analyzed using precision-weighted linear models. The voom method transforms normalized counts into log-counts per million (log-CPM) and estimates the mean-variance relationship across genes. Because the variability of RNA-seq measurements depends on their expression levels, voom calculates observation-level precision weights that account for differences in measurement uncertainty. These weights are then incorporated into limma’s empirical Bayes statistical framework.
- The log-counts per million transformation can be represented as:
- logCPMij = LOG2(KijNormalized + a)
- Here,
- Kijnormalized represents the normalized count for gene i in sample j, and a represents a small offset or prior count. In practice, voom uses a library-size-aware log-CPM calculation with an appropriate prior count rather than simply taking the logarithm of normalized counts.
- Voom estimates the relationship between the mean log-counts and the variance of the log-counts. It then assigns a precision weight to each gene observation, allowing more reliable measurements to contribute more strongly to the statistical model. The limma package fits linear models using these weights and applies empirical Bayes moderation to stabilize gene-wise variance estimates. This approach is particularly useful for complex experimental designs, including multiple treatment groups, factorial experiments, batch effects, and interaction analyses.
- All three methods produce log2 fold changes, p-values, and adjusted p-values for genes tested for differential expression. Multiple-testing correction is essential because RNA-seq experiments may evaluate thousands or tens of thousands of genes simultaneously. The Benjamini–Hochberg procedure is commonly used to control the false discovery rate, which represents the expected proportion of false positives among the genes declared statistically significant.
- Benjamini–Hochberg adjusted p-value formula:
- p(i)adjusted= mink≥i((m / k) * p(k))
- Here,
- p(k) represents the ordered p-values from smallest to largest, m represents the total number of statistical tests, and k represents the rank of a p-value. The adjusted p-values are constrained to be no greater than one and are calculated to maintain monotonicity across the ordered tests. A gene with an adjusted p-value below the chosen FDR threshold is considered statistically significant under that criterion.
- The results of differential expression analysis are commonly visualized using volcano plots, MA plots, heatmaps, and PCA plots. A volcano plot displays log2 fold change against the negative logarithm of the adjusted or unadjusted p-value, helping identify genes with both substantial expression changes and statistical evidence. An MA plot displays average expression against log2 fold change, allowing researchers to examine expression differences across the range of gene abundance. Heatmaps show expression patterns of selected genes across samples, while PCA helps identify major sources of variation and sample clustering. Tools such as EnhancedVolcano, ggplot2, pheatmap, ComplexHeatmap, and iSEE support visualization and interpretation of RNA-seq results.
- The three methods have different statistical implementations, but all are widely accepted for RNA-seq differential expression analysis. DESeq2 is frequently used for its integrated normalization, dispersion estimation, and statistical testing workflow. edgeR offers flexible negative binomial modelling and robust methods for complex experimental designs. Limma-voom is particularly useful when researchers want to apply the limma linear modelling framework to RNA-seq data, especially in multifactor experiments and studies with several covariates. The choice depends on the experimental design, data characteristics, analysis requirements, and familiarity with the software. Researchers should generally avoid selecting a method solely because it produces more statistically significant genes.
- Differential expression analysis also requires careful experimental design. Biological replicates are essential for estimating biological variability, and the number of replicates should be determined according to expected effect sizes, variability, sequencing depth, and statistical power. Technical replicates cannot replace independent biological replicates. Batch effects, sample quality, tissue composition, sequencing platform, and experimental covariates should be considered during the design and statistical modelling stages. Genes with low expression should be filtered appropriately, but filtering criteria should not remove biologically important genes without justification.
- The results of differential expression analysis are often followed by functional enrichment analysis to identify biological processes, molecular functions, cellular components, and pathways associated with differentially expressed genes. Databases and tools such as Gene Ontology (GO), KEGG, Reactome, g:Profiler, clusterProfiler, and Enrichr support functional interpretation. Gene expression changes can also be integrated with genetic variants, epigenomic data, protein abundance, and metabolomic measurements to investigate regulatory mechanisms and molecular interactions.
- In animal breeding and livestock genomics, differential expression analysis using DESeq2, edgeR, and limma-voom is valuable for identifying genes associated with economically important traits. Researchers can compare gene expression between animals with different growth rates, feed efficiencies, milk yields, reproductive performance, disease resistance, or environmental adaptability. For example, RNA-seq comparisons between high- and low-producing animals may reveal differentially expressed genes involved in metabolism, muscle development, mammary gland function, immune regulation, and nutrient utilization. These findings can help identify candidate genes, biological pathways, and molecular mechanisms underlying phenotypic variation.
- Despite their usefulness, differential expression methods have limitations. RNA-seq measures relative transcript abundance, so compositional bias can influence normalization and interpretation. Differences in tissue or cell-type composition can also produce apparent expression changes that do not necessarily reflect changes within individual cells. Statistical significance does not automatically indicate biological importance, and fold changes should be interpreted alongside adjusted p-values, expression levels, confidence in the experimental design, and biological evidence. Furthermore, differential expression identifies associations between experimental conditions and gene expression; it does not by itself establish that a gene causes a particular phenotype.
- DESeq2, edgeR, and limma-voom are essential tools in modern transcriptomics and RNA-seq analysis. They provide statistically rigorous approaches for detecting differences in gene expression while accounting for sequencing depth, biological variability, and multiple hypothesis testing. Their integration with quality control, functional enrichment, genomic information, and biological validation allows researchers to move from raw sequencing data toward meaningful interpretations of gene regulation, disease mechanisms, development, and complex traits.