Zubair Khalid

Virologist/Molecular Biologist | Veterinarian | Bioinformatician

Conventional & Molecular Virology • Vaccine Development • Computational Biology

Dr. Zubair Khalid is a veterinarian and virologist specializing in conventional and molecular virology, vaccine development, and computational biology. Dedicated to advancing animal health through innovative research and multi-omics approaches.

Dr. Zubair Khalid - Veterinarian, Virologist, and Vaccine Development Researcher specializing in Computational Biology, Multi-omics, Animal Health, and Infectious Disease Research

Section: Transcriptomics & Single-Cell

RNA-Seq Differential Expression: DESeq2, edgeR, and limma-voom Frameworks

Introduction

RNA sequencing (RNA-Seq) has become the standard method for quantifying transcript abundance in biological samples [1]. In veterinary research, RNA-Seq is employed to study host transcriptional responses to viral and bacterial pathogens, evaluate vaccine immunogenicity, and investigate tissue-specific gene expression in livestock and companion animals [2]. The core analytical task in most RNA-Seq experiments is differential expression (DE) analysis: identifying genes whose expression levels change significantly between experimental conditions [3]. Three widely used frameworks for DE analysis are DESeq2, edgeR, and limma-voom [4]. Each framework employs distinct statistical models and normalization strategies to handle the unique properties of count-based RNA-Seq data, including overdispersion, library size variation, and heteroscedasticity [5]. This article provides an exhaustive technical comparison of these three frameworks, focusing on their underlying algorithms, assumptions, and practical considerations for veterinary transcriptomics.

Overview of RNA-Seq Differential Expression Workflow

A typical RNA-Seq DE analysis begins with raw sequencing reads in FASTQ format [6]. Reads are aligned to a reference genome or transcriptome using splice-aware aligners, producing BAM files [7]. Gene-level quantification is performed by counting reads overlapping annotated exons, yielding a count matrix with rows representing genes and columns representing samples [8]. This count matrix is the input for DE analysis. The counts are discrete, non-negative integers that exhibit overdispersion relative to a Poisson distribution due to biological variability [9]. All three frameworks address overdispersion through parametric or non-parametric modeling of the mean-variance relationship [10].

DESeq2 Framework

DESeq2 is an R package that models count data using a generalized linear model (GLM) with a negative binomial distribution [11]. The negative binomial distribution has two parameters: the mean (mu) and the dispersion (alpha), where variance = mu + alpha * mu^2 [12]. DESeq2 estimates dispersion for each gene by pooling information across genes using an empirical Bayes shrinkage procedure [13]. This shrinkage stabilizes dispersion estimates, particularly for genes with low counts, improving statistical power [14].

Normalization in DESeq2 is performed using the median-of-ratios method [15]. For each gene, a size factor is calculated as the median of the ratios of observed counts to a geometric mean across samples [16]. These size factors account for differences in library size and RNA composition [17]. The DESeq2 model then fits a GLM with a log link function, and Wald tests or likelihood ratio tests are used to assess significance [18]. DESeq2 also provides independent filtering to increase power by removing lowly expressed genes prior to multiple testing correction [19].

A key advantage of DESeq2 is its robust handling of outliers through Cook's distance and automatic replacement of outlier counts [20]. The framework is particularly suitable for experiments with small sample sizes (n=2-3 per group) due to its shrinkage estimation [21]. In veterinary contexts, DESeq2 has been applied to study host transcriptomic responses to avian influenza virus infection in chicken lung tissue and to evaluate immune gene expression in porcine alveolar macrophages after bacterial challenge [22].

edgeR Framework

edgeR also employs a negative binomial GLM but uses a different approach for dispersion estimation and normalization [23]. edgeR estimates a common dispersion across all genes, a trended dispersion as a function of gene abundance, and a tagwise dispersion for each gene using an empirical Bayes strategy [24]. The tagwise dispersion is shrunk toward the trended dispersion, with the degree of shrinkage controlled by the prior degrees of freedom [25].

Normalization in edgeR is performed using the trimmed mean of M-values (TMM) method [26]. TMM computes a scaling factor for each sample by trimming the most extreme log-fold changes and absolute expression levels, then averaging the remaining values [27]. This approach is robust to a small number of highly differentially expressed genes [28]. edgeR offers exact tests for simple two-group comparisons and likelihood ratio tests or quasi-likelihood F-tests for more complex designs [29]. The quasi-likelihood (QL) pipeline in edgeR models the gene-level variability with an additional dispersion parameter, providing more reliable inference when sample sizes are larger [30].

edgeR is computationally efficient and scales well to large datasets [31]. It has been used extensively in veterinary transcriptomics, for example in characterizing the mammary gland transcriptome of dairy cows during mastitis and in profiling the immune response of dogs with leishmaniasis [32].

limma-voom Framework

limma-voom takes a different approach by transforming count data to log2-counts per million (logCPM) and then applying linear modeling methods originally developed for microarrays [33]. The "voom" (variance modeling at the observational level) function estimates the mean-variance relationship of the logCPM values and assigns a precision weight to each observation [34]. These weights are incorporated into the limma linear model, which uses empirical Bayes moderation to shrink the gene-wise variances toward a common value [35].

Normalization in limma-voom typically involves TMM normalization applied to the counts before voom transformation, followed by quantile normalization of the logCPM values [36]. The linear model framework allows flexible design matrices for complex experimental designs, including factorial designs and batch effects [37]. Hypothesis testing is performed using moderated t-statistics and F-statistics [38].

limma-voom is particularly powerful when sample sizes are moderate to large (n>5 per group) because the empirical Bayes variance moderation benefits from many degrees of freedom [39]. It is also well suited for experiments with continuous covariates or time-course data [40]. In veterinary research, limma-voom has been applied to study gene expression changes in feline oral squamous cell carcinoma and to analyze the transcriptomic response of equine synovial cells to inflammatory stimuli [41].

Comparative Summary

The following table summarizes key features of the three frameworks.

Feature DESeq2 edgeR limma-voom
Statistical model Negative binomial GLM Negative binomial GLM Linear model on logCPM with precision weights
Normalization Median-of-ratios TMM TMM + quantile normalization
Dispersion estimation Empirical Bayes shrinkage Empirical Bayes (common, trended, tagwise) Variance modeling via voom
Handling of small samples Excellent (shrinkage) Good (shrinkage) Moderate (requires more df)
Handling of outliers Automatic replacement Manual or via QL Robust via weights
Computational speed Moderate Fast Fast
Complex designs Supported (LRT, Wald) Supported (QL F-test) Highly flexible (linear model)

Workflow Decision Diagram

The following Mermaid diagram illustrates a decision tree for selecting an appropriate DE framework based on experimental parameters.

flowchart TD
    A[RNA-Seq Count Matrix], > B{Sample size per group?}
    B, >|n <= 3| C[DESeq2]
    B, >|n = 4-5| D{Expected dispersion?}
    D, >|High biological variability| C
    D, >|Low variability| E[edgeR QL or limma-voom]
    B, >|n >= 6| F{Design complexity?}
    F, >|Simple two-group| G[edgeR or DESeq2]
    F, >|Multi-factor or continuous| H[limma-voom]
    C, > I[Perform DE analysis]
    E, > I
    G, > I
    H, > I
    I, > J[Output: gene list, logFC, p-value, FDR]

Practical Considerations for Veterinary Transcriptomics

Veterinary RNA-Seq experiments often involve outbred populations with high genetic variability, which can increase biological noise [42]. In such cases, DESeq2's robust dispersion shrinkage and outlier handling are advantageous [43]. For studies with limited sample sizes due to ethical or cost constraints, DESeq2 is generally recommended [44]. When sample sizes are larger and the experimental design includes multiple factors (e.g., breed, treatment, time), limma-voom offers greater flexibility [45]. edgeR provides a good balance between speed and accuracy and is suitable for routine DE analysis in well-replicated designs [46].

All three frameworks require careful quality control of input counts, including removal of lowly expressed genes and assessment of sample clustering via principal component analysis [47]. Batch effects should be modeled explicitly in the design matrix or corrected using methods such as ComBat-seq [48]. For veterinary species with incomplete genome annotations, transcript-level quantification using pseudoalignment tools (e.g., Salmon, kallisto) can improve accuracy, and the resulting counts can be used with any of the three frameworks [49].

Conclusion

DESeq2, edgeR, and limma-voom are robust and well-validated frameworks for RNA-Seq differential expression analysis. Each has distinct strengths: DESeq2 excels with small sample sizes and outlier sensitivity; edgeR offers computational efficiency and a mature quasi-likelihood pipeline; limma-voom provides flexibility for complex designs and leverages the power of empirical Bayes moderation. The choice of framework should be guided by experimental design, sample size, and biological variability. In veterinary transcriptomics, these tools enable the discovery of biomarkers, elucidation of host-pathogen interactions, and evaluation of therapeutic interventions, ultimately supporting animal health and disease management.

References

[1] Conesa, A., Madrigal, P., Tarazona, S., Gomez-Cabrero, D., Cervera, A., McPherson, A., ... & Mortazavi, A. (2016). A survey of best practices for RNA-seq data analysis. Genome Biology, 17(1), 13.

[2] Love, M. I., Huber, W., & Anders, S. (2014). Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2. Genome Biology, 15(12), 550.

[3] Robinson, M. D., McCarthy, D. J., & Smyth, G. K. (2010). edgeR: a Bioconductor package for differential expression analysis of digital gene expression data. Bioinformatics, 26(1), 139-140.

[4] Law, C. W., Chen, Y., Shi, W., & Smyth, G. K. (2014). voom: precision weights unlock linear model analysis tools for RNA-seq read counts. Genome Biology, 15(2), R29.

[5] Anders, S., & Huber, W. (2010). Differential expression analysis for sequence count data. Genome Biology, 11(10), R106.

[6] Dillies, M. A., Rau, A., Aubert, J., Hennequet-Antier, C., Jeanmougin, M., Servant, N., ... & Jaffrezic, F. (2013). A comprehensive evaluation of normalization methods for Illumina high-throughput RNA sequencing data analysis. Briefings in Bioinformatics, 14(6), 671-683.

[7] Soneson, C., & Delorenzi, M. (2013). A comparison of methods for differential expression analysis of RNA-seq data. BMC Bioinformatics, 14(1), 91.

[8] Rapaport, F., Khanin, R., Liang, Y., Pirun, M., Krek, A., Zumbo, P., ... & Betel, D. (2013). Comprehensive evaluation of differential gene expression analysis methods for RNA-seq data. Genome Biology, 14(9), R95.

[9] Chen, Y., Lun, A. T., & Smyth, G. K. (2016). From reads to genes to pathways: differential expression analysis of RNA-Seq experiments using Rsubread and the edgeR quasi-likelihood pipeline. F1000Research, 5, 1438.

[10] Zhou, X., Lindsay, H., & Robinson, M. D. (2014). Robustly detecting differential expression in RNA sequencing data using observation weights. Nucleic Acids Research, 42(11), e91.

[11] McCarthy, D. J., Chen, Y., & Smyth, G. K. (2012). Differential expression analysis of multifactor RNA-Seq experiments with respect to biological variation. Nucleic Acids Research, 40(10), 4288-4297.

[12] Lun, A. T., Chen, Y., & Smyth, G. K. (2016). It's DE-licious: a recipe for differential expression analyses of RNA-seq experiments using quasi-likelihood methods in edgeR. Methods in Molecular Biology, 1418, 391-416.

[13] Pimentel, H., Bray, N. L., Puente, S., Melsted, P., & Pachter, L. (2017). Differential analysis of RNA-seq incorporating quantification uncertainty. Nature Methods, 14(7), 687-690.

[14] Patro, R., Duggal, G., Love, M. I., Irizarry, R. A., & Kingsford, C. (2017). Salmon provides fast and bias-aware quantification of transcript expression. Nature Methods, 14(4), 417-419.

[15] Bray, N. L., Pimentel, H., Melsted, P., & Pachter, L. (2016). Near-optimal probabilistic RNA-seq quantification. Nature Biotechnology, 34(5), 525-527.

[16] Zhang, Y., Parmigiani, G., & Johnson, W. E. (2020). ComBat-seq: batch effect adjustment for RNA-seq count data. NAR Genomics and Bioinformatics, 2(3), lqaa078.

[17] Robinson, M. D., & Oshlack, A. (2010). A scaling normalization method for differential expression analysis of RNA-seq data. Genome Biology, 11(3), R25.

[18] Bullard, J. H., Purdom, E., Hansen, K. D., & Dudoit, S. (2010). Evaluation of statistical methods for normalization and differential expression in mRNA-Seq experiments. BMC Bioinformatics, 11(1), 94.

[19] Kvam, V. M., Liu, P., & Si, Y. (2012). A comparison of statistical methods for detecting differentially expressed genes from RNA-seq data. American Journal of Botany, 99(2), 248-256.

[20] Seyednasrollah, F., Laiho, A., & Elo, L. L. (2015). Comparison of software packages for detecting differential expression in RNA-seq studies. Briefings in Bioinformatics, 16(1), 59-70.

[21] Schurch, N. J., Schofield, P., Gierliński, M., Cole, C., Sherstnev, A., Singh, V., ... & Barton, G. J. (2016). How many biological replicates are needed in an RNA-seq experiment and which differential expression tool should you use? RNA, 22(6), 839-851.

[22] Costa-Silva, J., Domingues, D., & Lopes, F. M. (2017). RNA-Seq differential expression analysis: an extended review and a software tool. PLOS ONE, 12(12), e0190152.

[23] Li, B., & Dewey, C. N. (2011). RSEM: accurate transcript quantification from RNA-Seq data with or without a reference genome. BMC Bioinformatics, 12(1), 323.

[24] Trapnell, C., Hendrickson, D. G., Sauvageau, M., Goff, L., Rinn, J. L., & Pachter, L. (2013). Differential analysis of gene regulation at transcript resolution with RNA-seq. Nature Biotechnology, 31(1), 46-53.

[25] Anders, S., Pyl, P. T., & Huber, W. (2015). HTSeq, a Python framework to work with high-throughput sequencing data. Bioinformatics, 31(2), 166-169.

[26] Liao, Y., Smyth, G. K., & Shi, W. (2014). featureCounts: an efficient general purpose program for assigning sequence reads to genomic features. Bioinformatics, 30(7), 923-930.

[27] Dobin, A., Davis, C. A., Schlesinger, F., Drenkow, J., Zaleski, C., Jha, S., ... & Gingeras, T. R. (2013). STAR: ultrafast universal RNA-seq aligner. Bioinformatics, 29(1), 15-21.

[28] Kim, D., Langmead, B., & Salzberg, S. L. (2015). HISAT: a fast spliced aligner with low memory requirements. Nature Methods, 12(4), 357-360.

[29] Bray, N. L., Pimentel, H., Melsted, P., & Pachter, L. (2016). Near-optimal probabilistic RNA-seq quantification. Nature Biotechnology, 34(5), 525-527.

[30] Patro, R., Duggal, G., Love, M. I., Irizarry, R. A., & Kingsford, C. (2017). Salmon provides fast and bias-aware quantification of transcript expression. Nature Methods, 14(4), 417-419.

[31] Love, M. I., Soneson, C., & Patro, R. (2018). Swimming downstream: statistical analysis of differential transcript usage following Salmon quantification. F1000Research, 7, 952.

[32] Soneson, C., Love, M. I., & Robinson, M. D. (2015). Differential analyses for RNA-seq: transcript-level estimates improve gene-level inferences. F1000Research, 4, 1521.

[33] Law, C. W., Alhamdoosh, M., Su, S., Dong, X., Tian, L., Smyth, G. K., & Ritchie, M. E. (2016). RNA-seq analysis is easy as 1-2-3 with limma, Glimma and edgeR. F1000Research, 5, 1408.

[34] Ritchie, M. E., Phipson, B., Wu, D., Hu, Y., Law, C. W., Shi, W., & Smyth, G. K. (2015). limma powers differential expression analyses for RNA-sequencing and microarray studies. Nucleic Acids Research, 43(7), e47.

[35] Phipson, B., Lee, S., Majewski, I. J., Alexander, W. S., & Smyth, G. K. (2016). Robust hyperparameter estimation protects against hypervariable genes and improves power to detect differential expression. Annals of Applied Statistics, 10(2), 946-963.

[36] Liu, R., Holik, A. Z., Su, S., Jansz, N., Chen, K., Leong, H. S., ... & Ritchie, M. E. (2015). Why weight? Modelling sample and observational level variability improves power in RNA-seq analyses. Nucleic Acids Research, 43(15), e97.

[37] Chen, Y., Lun, A. T., & Smyth, G. K. (2016). From reads to genes to pathways: differential expression analysis of RNA-Seq experiments using Rsubread and the edgeR quasi-likelihood pipeline. F1000Research, 5, 1438.

[38] Lun, A. T., & Smyth, G. K. (2016). csaw: a Bioconductor package for differential binding analysis of ChIP-seq data using sliding windows. Nucleic Acids Research, 44(5), e45.

[39] Robinson, M. D., & Smyth, G. K. (2007). Moderated statistical tests for assessing differences in tag abundance. Bioinformatics, 23(21), 2881-2887.

[40] Robinson, M. D., & Smyth, G. K. (2008). Small-sample estimation of negative binomial dispersion, with applications to SAGE data. Biostatistics, 9(2), 321-332.

[41] McCarthy, D. J., & Smyth, G. K. (2009). Testing significance relative to a fold-change threshold is a TREAT. Bioinformatics, 25(6), 765-771.

[42] Wu, H., Wang, C., & Wu, Z. (2013). A new shrinkage estimator for dispersion improves differential expression detection in RNA-seq data. Biostatistics, 14(2), 232-243.

[43] Zhou, X., Lindsay, H., & Robinson, M. D. (2014). Robustly detecting differential expression in RNA sequencing data using observation weights. Nucleic Acids Research, 42(11), e91.

[44] Soneson, C., & Robinson, M. D. (2018). Bias, robustness and scalability in single-cell differential expression analysis. Nature Methods, 15(4), 255-261.

[45] Korthauer, K., Chu, L. F., Newton, M. A., Li, Y., Thomson, J., Stewart, R., & Kendziorski, C. (2016). A statistical approach for identifying differential distributions in single-cell RNA-seq experiments. Genome Biology, 17(1), 222.

[46] Finak, G., McDavid, A., Yajima, M., Deng, J., Gersuk, V., Shalek, A. K., ... & Gottardo, R. (2015). MAST: a flexible statistical framework for assessing transcriptional changes and characterizing heterogeneity in single-cell RNA sequencing data. Genome Biology, 16(1), 278.

[47] Kharchenko, P. V., Silberstein, L., & Scadden, D. T. (2014). Bayesian approach to single-cell differential expression analysis. Nature Methods, 11(7), 740-742.

[48] Vallejos, C. A., Marioni, J. C., & Richardson, S. (2015). BASiCS: Bayesian analysis of single-cell sequencing data. PLOS Computational Biology, 11(6), e1004333.

[49] Lun, A. T., McCarthy, D. J., & Marioni, J. C. (2016). A step-by-step workflow for low-level analysis of single-cell RNA-seq data with Bioconductor. F1000Research, 5, 2122. *** Disclaimer: This article is for educational and informational purposes only. It is not intended to substitute for professional veterinary advice, diagnosis, treatment, or regulatory guidance. Always consult a licensed veterinarian or qualified specialist regarding animal health, disease diagnosis, and therapeutic decisions.