How to Perform Differential Expression Analysis for Small RNA-seq Data: A Step-by-Step Tutorial in R
By Dr. Zubair Khalid, DVM, MS, PhD ·

Key Takeaways
- Small RNA-seq differential expression analysis necessitates distinct normalization strategies compared to mRNA-seq, with Reads Per Million (RPM) often preferred over cross-sample methods like TMM or DESeq2's median-of-ratios to avoid over-correction due to the high abundance of a few microRNAs.
- Biological replicates are critical; a minimum of three per condition is recommended, with five or more significantly improving the reliability and replicability of differential expression results by better estimating biological variability.
- Low-count filtering is essential to enhance statistical power and reduce the multiple testing burden by retaining features with counts per million above 1 in at least the smallest group size.
- For differential expression testing, edgeR's
exactTestis suitable for two-group comparisons, while theglmQLFTestis appropriate for multifactor designs, both leveraging negative binomial models. - Interpretation of results requires defining thresholds for adjusted p-values (e.g., < 0.05) and log2 fold change (e.g., > 1) and validating significant features by examining individual sample counts and considering biological plausibility.
- Common failure patterns include over-correction by normalization, insufficient replicates leading to low power, dominant features skewing normalization, and batch effects; addressing these requires careful diagnostic checks and adherence to recommended workflows.
Small RNA sequencing captures microRNAs, transfer RNAs, piRNAs, small nucleolar RNAs, and other short noncoding transcripts. Differential expression analysis for these data requires decisions that differ from standard messenger RNA sequencing workflows. This tutorial provides a complete path from raw counts to a defensible list of differentially expressed small RNAs using R, with edgeR and DESeq2 as the primary tools. The target reader is a biology student, researcher, or laboratory professional who has count data from a small RNA-seq experiment and needs reproducible analysis steps with clear interpretation criteria.
Scope and Data Requirements
Small RNA-seq differential expression analysis starts with a count matrix. Each row represents one small RNA feature, typically a mature microRNA or a precursor hairpin, and each column represents one biological sample. The values are integer counts of sequencing reads that mapped to each feature. This tutorial assumes you have already completed read preprocessing, alignment, and quantification. If you need to generate count matrices from raw FASTQ files, the Galaxy Training Network provides accessible workflow tutorials, and the nf-core documentation describes community-maintained pipeline standards for reproducible configuration.
The minimum input for the R workflow is a tabular count file and a sample metadata table. The metadata table must contain at least a sample identifier and a condition label. Additional covariates such as batch, sex, or age can be included and modeled. The Bioconductor project provides the primary R packages used in this workflow, and its documentation includes installation instructions and detailed vignettes for edgeR and DESeq2.
Biological replicates are essential. A differential expression analysis with one sample per condition cannot estimate biological variability and will produce unreliable results. Studies using subsampled RNA-seq experiments from 18 different data sets found that differential expression and enrichment analysis results from underpowered experiments are unlikely to replicate well. Low replicability does not necessarily imply low precision, as data sets exhibit a wide range of possible outcomes. For cohorts with more than five replicates, 10 out of 18 data sets achieved high median precision despite low recall and replicability. A practical recommendation is to include at least three biological replicates per condition, and preferably five or more, to improve the chance that detected differences reflect true biological variation instead of sampling noise.
At a Glance
| Workflow Step | Recommended Tool or Method | Key Decision Point |
|---|---|---|
| Count matrix import | read.delim or read.csv in R | Confirm row names are feature identifiers and columns are sample identifiers |
| Low-count filtering | Keep features with counts per million above 1 in at least the smallest group size | Filtering threshold affects the number of tests and the power to detect true differences |
| Normalization | Reads per million for within-sample scaling | Cross-sample methods such as TMM may over-correct in small RNA data |
| Dispersion estimation | edgeR estimateDisp | Requires biological replicates, pooled dispersion for experiments with few replicates |
| Differential expression testing | edgeR exactTest or glmQLFTest | Choose exact test for two-group comparisons and GLM approach for multifactor designs |
| Multiple testing correction | Benjamini-Hochberg false discovery rate | Use adjusted p-values for feature ranking |
| Result interpretation | log2 fold change and adjusted p-value | Validate with individual sample counts and consider biological plausibility |
Why Small RNA-seq Differential Expression Differs from mRNA-seq
Small RNA-seq data have characteristics that make standard mRNA-seq assumptions problematic. MicroRNAs are short, often 18 to 24 nucleotides, and their counts are dominated by a small number of highly abundant species. A few microRNAs can account for a large fraction of total mapped reads, while thousands of other small RNAs are present at very low counts. This dynamic range is wider than typical mRNA-seq data and affects normalization choices.
A benchmark study using a realistic ground-truth dataset compared normalization and differential expression methods for microRNA sequencing data. The study mixed mouse RNA from two organs to generate expression trends while capturing biological and technical variability. Within-sample scaling, particularly reads per million, best preserved the expected monotonic trends. Cross-sample methods such as TMM, rlog, and VST sometimes recovered apparent monotonicity among abundant microRNAs, but inspection of individual profiles suggested likely over-correction. The study concluded that within-sample scaling methods such as RPM are supported for normalization, and edgeR, miRglmm, or NBSR are supported for differential expression testing. DESeq2, edgeR-v4, and limma-based approaches tended to systematically underestimate log2 fold changes. Applying RPM-based normalization substantially improved the performance of cross-sample methods, highlighting the strong influence of normalization on differential expression analysis.
This evidence matters for practical decisions. If you use DESeq2 with its default median-of-ratios normalization on small RNA-seq data, you may obtain fold changes that are systematically compressed. If you use edgeR with TMM normalization, you may over-correct for composition effects that are not meaningful in small RNA data. The recommended approach is to normalize with RPM and then use edgeR for differential expression testing, or to apply RPM normalization before using DESeq2.
Setting Up the R Environment
Install R and RStudio if they are not already available. The Bioconductor project provides installation instructions for its packages. Open R and install the required packages with the following commands:
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(c("edgeR", "DESeq2"))
The edgeR package is used for differential expression analysis based on negative binomial models. The DESeq2 package provides an alternative approach with shrinkage estimation for dispersions and fold changes to improve stability and interpretability of estimates. Both packages are documented on the Bioconductor project website, and their vignettes include worked examples with simulated and real data.
Load the packages and set a working directory:
library(edgeR)
library(DESeq2)
setwd("path/to/your/project")
The The Carpentries Lessons provide foundational training in computing, data, shell, Git, and programming practices that support reproducible analysis projects. Using version control and organized project directories from the start makes the analysis easier to document and share.
Importing Count Data and Metadata
Create a count matrix file where rows are small RNA features and columns are samples. The first column should contain feature identifiers such as mature microRNA names or miRBase accession numbers. The remaining columns should contain integer counts for each sample.
Create a metadata file with at least two columns: sample identifiers and condition labels. The sample identifiers must match the column names in the count matrix. Additional columns can include batch, sex, age, or any other covariate you plan to model.
Read the count matrix into R:
counts <- read.delim("counts.txt", row.names = 1, header = TRUE)
Read the metadata:
metadata <- read.delim("metadata.txt", row.names = 1, header = TRUE)
Check that the sample order in the metadata matches the column order in the count matrix:
all(colnames(counts) == rownames(metadata))
This command should return TRUE. If it returns FALSE, reorder the metadata rows to match the count matrix columns:
metadata <- metadata[colnames(counts), , drop = FALSE]
Confirm the dimensions of the count matrix:
dim(counts)
The number of rows is the number of small RNA features, and the number of columns is the number of samples. Record these numbers in your analysis notebook because they are needed for reporting.
Quality Control Before Differential Expression
Quality control at the count matrix level identifies sample outliers, sequencing depth differences, and potential batch effects. The EMBL-EBI Training resources provide background on quality assessment in sequencing data analysis and practical training for bioinformatics workflows.
Compute library sizes, which are the total number of reads mapped to small RNA features for each sample:
lib_sizes <- colSums(counts)
Examine the distribution of library sizes:
summary(lib_sizes)
Large variation in library sizes is common in small RNA-seq data. Samples with very low library sizes may have failed library preparation or sequencing and should be examined carefully. A sample with a library size that is an order of magnitude lower than the others may need to be excluded.
Compute the proportion of reads mapping to the top features:
top_features <- head(sort(rowSums(counts), decreasing = TRUE), 10)
top_proportion <- sum(top_features) / sum(counts)
In small RNA-seq data, the top 10 features often account for a substantial fraction of total reads. This is expected and reflects the biology of microRNA expression. However, if a single feature accounts for more than 50 percent of reads in some samples but not others, this may indicate a technical artifact or a contamination issue.
Create a multi-dimensional scaling plot to visualize sample relationships:
dge <- DGEList(counts = counts, group = metadata$condition)
plotMDS(dge)
Samples from the same condition should cluster together. If samples cluster by batch instead of by condition, a batch effect is present and should be modeled in the differential expression analysis. The Galaxy Training Network includes tutorials on exploratory data analysis for sequencing data that demonstrate these diagnostic plots.
Low-Count Filtering
Small RNA-seq data contain many features with zero or very low counts across all samples. These features provide no information for differential expression testing and increase the multiple testing burden. Filtering them out improves statistical power and reduces the number of false discoveries.
A common filtering approach is to retain features that have a counts per million value above a threshold in a minimum number of samples. The threshold and minimum sample count depend on the library size and the number of samples per condition.
Compute CPM values:
cpm_values <- cpm(dge)
Filter features that do not have CPM above 1 in at least the number of samples in the smallest condition group:
min_samples <- min(table(metadata$condition))
keep <- rowSums(cpm_values > 1) >= min_samples
dge_filtered <- dge[keep, , keep.lib.sizes = FALSE]
The keep.lib.sizes = FALSE argument recalculates library sizes after filtering. This is important because removing low-count features changes the total library size and affects downstream normalization.
Record the number of features before and after filtering:
n_before <- nrow(dge)
n_after <- nrow(dge_filtered)
The proportion of features retained depends on the sequencing depth and the complexity of the small RNA repertoire. In typical small RNA-seq data, filtering removes a large fraction of features because many small RNAs are expressed at very low levels or are present in only a few samples.
Normalization for Small RNA-seq Data
Normalization adjusts for differences in library size and composition across samples. The choice of normalization method has a strong influence on differential expression results, as demonstrated by the benchmark study described earlier. For small RNA-seq data, within-sample scaling with RPM is recommended.
Compute RPM normalization:
dge_norm <- calcNormFactors(dge_filtered, method = "none")
The method = "none" argument tells edgeR not to apply TMM or other cross-sample normalization factors. The effective library sizes are then simply the raw library sizes, and CPM values are equivalent to RPM values.
If you prefer to use edgeR's default TMM normalization for comparison, you can compute it separately:
dge_tmm <- calcNormFactors(dge_filtered, method = "TMM")
Compare the normalization factors:
dge_norm$samples$norm.factors
dge_tmm$samples$norm.factors
If the TMM normalization factors deviate substantially from 1, this indicates that cross-sample composition effects are present. In small RNA-seq data, these effects may reflect the dominance of a few highly abundant microRNAs instead of meaningful biological differences. The benchmark evidence supports using RPM normalization to avoid over-correction.
For DESeq2, apply RPM normalization before creating the DESeqDataSet object. This is a departure from the default DESeq2 workflow, which uses median-of-ratios normalization. The benchmark study showed that applying RPM-based normalization substantially improved the performance of cross-sample methods, including DESeq2.
Differential Expression Testing with edgeR
edgeR fits a negative binomial model to the count data and tests for differential expression between conditions. The workflow involves estimating dispersions, fitting a model, and testing contrasts.
Estimate the dispersion:
dge_test <- estimateDisp(dge_norm)
The dispersion parameter captures biological variability between replicates. With few replicates, the dispersion estimate is imprecise, and edgeR uses an empirical Bayes approach to moderate the dispersion estimates toward a common value. The estimateDisp function produces a common dispersion, trended dispersion, and tagwise dispersion. The tagwise dispersion is used for testing individual features.
For a two-group comparison, use the exact test:
et <- exactTest(dge_test)
Extract the results table:
results_edgeR <- topTags(et, n = nrow(dge_test))
results_edgeR_table <- results_edgeR$table
The results table contains the log2 fold change, log counts per million, p-value, and false discovery rate adjusted p-value for each feature. Sort the table by adjusted p-value to see the most significant features:
results_edgeR_table <- results_edgeR_table[order(results_edgeR_table$FDR), ]
For experiments with more than two groups or additional covariates, use the generalized linear model approach:
design <- model.matrix(~ condition, data = metadata)
dge_glm <- estimateDisp(dge_norm, design)
fit <- glmQLFit(dge_glm, design)
qlf <- glmQLFTest(fit, coef = 2)
results_edgeR_glm <- topTags(qlf, n = nrow(dge_glm))
The coef = 2 argument tests the second coefficient, which corresponds to the condition effect when the design matrix includes an intercept and a condition term. For designs with multiple coefficients, specify the contrast of interest explicitly.
Differential Expression Testing with DESeq2
DESeq2 provides an alternative framework for differential expression analysis. The method uses shrinkage estimation for dispersions and fold changes to improve stability and interpretability of estimates. This enables a more quantitative analysis focused on the strength instead of the mere presence of differential expression.
Create a DESeqDataSet object from the filtered count matrix and metadata:
dds <- DESeqDataSetFromMatrix(
countData = counts_filtered,
colData = metadata,
design = ~ condition
)
The counts_filtered object should be the filtered count matrix with RPM normalization applied. To apply RPM normalization, divide each count by the library size and multiply by one million:
lib_sizes_filtered <- colSums(counts_filtered)
rpm_counts <- sweep(counts_filtered, 2, lib_sizes_filtered, FUN = "/") * 1e6
Use the RPM-normalized counts in the DESeqDataSet:
dds <- DESeqDataSetFromMatrix(
countData = round(rpm_counts),
colData = metadata,
design = ~ condition
)
The round function converts the RPM values to integers, which is required because DESeq2 expects count data. This approach applies RPM normalization before DESeq2's internal normalization, which the benchmark study showed improves performance for small RNA-seq data.
Run the differential expression analysis:
dds <- DESeq(dds)
Extract the results:
results_DESeq2 <- results(dds)
The results object contains the base mean, log2 fold change, standard error, Wald statistic, p-value, and adjusted p-value for each feature. Sort by adjusted p-value:
results_DESeq2 <- results_DESeq2[order(results_DESeq2$padj), ]
Compare the DESeq2 results with the edgeR results. Features that are significant in both analyses are more likely to be true positives. Features that are significant in only one analysis should be examined individually, with attention to the raw counts and the normalization method used.
Interpreting Differential Expression Results
The output of a differential expression analysis is a table of features with log2 fold changes and adjusted p-values. Interpretation requires setting thresholds for significance and effect size, then examining the biological context of the significant features.
A common threshold is an adjusted p-value below 0.05 and an absolute log2 fold change above 1, which corresponds to a 2-fold change. These thresholds are arbitrary and should be adjusted based on the goals of the experiment. For exploratory analyses, a more lenient threshold may be appropriate. For validation studies, a more stringent threshold reduces false positives.
Identify significant features:
significant <- results_edgeR_table[results_edgeR_table$FDR < 0.05 & abs(results_edgeR_table$logFC) > 1, ]
Record the number of significant features:
n_significant <- nrow(significant)
Examine the distribution of log2 fold changes among significant features:
summary(significant$logFC)
A balanced distribution with similar numbers of up-regulated and down-regulated features is typical. A highly skewed distribution may indicate a normalization problem or a batch effect.
For each significant feature, examine the individual sample counts to confirm that the difference is consistent across replicates:
feature_name <- rownames(significant)[1]
counts[feature_name, ]
This command prints the raw counts for the top significant feature across all samples. The counts should show a clear separation between conditions, with minimal overlap. If the counts are highly variable within a condition, the feature may not be reliably differentially expressed despite passing the statistical threshold.
Visualizing Results
Visualization helps communicate results and identify potential problems. Create a volcano plot to show the relationship between fold change and significance:
plot(results_edgeR_table$logFC, -log10(results_edgeR_table$FDR),
xlab = "log2 fold change", ylab = "-log10 FDR",
pch = 20, col = ifelse(results_edgeR_table$FDR < 0.05, "red", "black"))
Create a heatmap of the top differentially expressed features:
top_features <- rownames(significant)[1:50]
heatmap_data <- cpm(dge_norm)[top_features, ]
heatmap(heatmap_data, scale = "row")
The heatmap should show clear clustering of samples by condition. If samples do not cluster by condition, the differential expression results may be driven by a few outlier samples instead of a consistent biological difference.
Common Failure Patterns and How to Address Them
Several failure patterns recur in small RNA-seq differential expression analysis. Recognizing these patterns early saves time and prevents incorrect conclusions.
The first pattern is over-correction by cross-sample normalization. When TMM or DESeq2's median-of-ratios normalization produces normalization factors that vary widely across samples, the resulting fold changes may be compressed or inverted. The benchmark evidence showed that cross-sample methods sometimes recovered apparent monotonicity among abundant microRNAs but that individual profiles suggested likely over-correction. The solution is to use RPM normalization and compare results with and without cross-sample normalization.
The second pattern is low power due to insufficient replicates. Studies using subsampled RNA-seq experiments found that differential expression and enrichment analysis results from underpowered experiments are unlikely to replicate well. If you have only two or three replicates per condition, the list of significant features will be unstable, and many true differences will be missed. The solution is to add more replicates if possible, or to interpret results with caution and validate with an independent method such as quantitative PCR.
The third pattern is the presence of a dominant feature that drives normalization. In small RNA-seq data, a single microRNA can account for a large fraction of total reads. If this microRNA differs substantially between conditions, it can distort normalization factors and affect all other features. The solution is to examine the proportion of reads mapping to the top features and consider excluding the dominant feature from normalization calculations.
The fourth pattern is batch effects that correlate with the condition of interest. If all treated samples were processed in one batch and all control samples in another, the differential expression results will confound batch and condition. The solution is to include batch as a covariate in the model, or to use a paired design if samples were processed in matched batches.
The fifth pattern is the presence of contaminating small RNAs from reagents or the environment. Small RNA-seq data from biofluids can contain RNAs from bacteria, fungi, and viruses, and filtering these contaminants is a formidable challenge. Tools such as sRNAflow address this by filtering potential RNAs from reagents and environment, classifying small RNA types, and managing small RNA annotation overlap. If your samples are from biofluids, consider using a dedicated small RNA analysis pipeline that handles contaminant filtering.
The sixth pattern is the loss of small RNA species during globin depletion in blood samples. When profiling blood samples by RNA-seq, RNA from haemoglobin can account for up to 70 percent of the transcriptome. Hybridisation-based depletion methods remove haemoglobin RNA prior to sequencing, while bioinformatic depletion removes reads arising from haemoglobin RNA after sequencing. A study comparing these approaches found that bioinformatic depletion substantially reduced library sizes, with a median reduction of 57.24 percent, and fewer long noncoding, micro, small nuclear, and small nucleolar RNAs were captured in these libraries. If your samples are from blood and you used bioinformatic depletion, be aware that small RNA species may be underrepresented and that differential expression results may be affected.
Records and Reproducibility
Reproducibility requires recording every decision made during the analysis. The nf-core documentation emphasizes community pipeline standards for reproducible workflow configuration, and the Bioconductor project provides tools for reproducible genomic analysis.
Record the following information in your analysis notebook:
- The version of R and all packages used, which can be obtained with
sessionInfo() - The count matrix file name and its source
- The metadata file name and its contents
- The filtering threshold and the number of features retained
- The normalization method and any normalization factors
- The differential expression method and model formula
- The significance thresholds used
- The number of significant features and the top features
Save the results to files for downstream analysis:
write.table(results_edgeR_table, "edgeR_results.txt", sep = "\t", quote = FALSE)
write.table(results_DESeq2, "DESeq2_results.txt", sep = "\t", quote = FALSE)
Save the normalized counts for visualization and sharing:
write.table(cpm(dge_norm), "RPM_normalized_counts.txt", sep = "\t", quote = FALSE)
The The Carpentries Lessons provide foundational training in reproducible computing practices, including version control with Git and organizing analysis projects. Using these practices from the start of a project makes the analysis easier to document and share.
Limitations of Differential Expression Analysis
Differential expression analysis identifies features whose mean expression differs between conditions, but it does not establish causality or biological mechanism. A feature that is differentially expressed may be a cause, a consequence, or a bystander of the biological process under study.
The statistical framework used by edgeR and DESeq2 is primarily optimized to detect monotonic mean shifts between conditions. Features whose disease association arises at both low and high expression levels, referred to as improper expression profiles, may be overlooked by standard tools. Receiver operating characteristic based indices such as the generalized area under the curve and the length of the ROC curve can support exploratory screening and prioritization of these improper expression profiles as a complement to conventional differential expression methods. If you suspect that a small RNA has a non-monotonic relationship with the condition of interest, consider applying these complementary screening approaches.
Differential expression analysis also does not account for the regulatory relationships between small RNAs and their targets. A change in a microRNA's expression may have downstream effects on many messenger RNAs, and these effects are not captured by the differential expression analysis of the small RNA itself. Integrating small RNA-seq data with mRNA-seq data from the same samples can reveal these regulatory relationships, but this integration requires additional analysis steps beyond the scope of this tutorial.
The replicability of differential expression results depends on the sample size and the heterogeneity of the population. Studies using real gene expression data from 18 different data sets found that differential expression and enrichment analysis results from underpowered experiments are unlikely to replicate well. However, low replicability does not necessarily imply low precision, as data sets exhibit a wide range of possible outcomes. To estimate the expected performance regime of your data set, use a bootstrapping procedure that correlates with observed replicability and precision metrics. This procedure can help you decide whether your sample size is adequate for the conclusions you want to draw.
For interspecies comparisons, additional complexity arises from evolutionary drift that can blur the signal left by lineage-specific shifts in mean expression and induces phylogenetic correlations that, if ignored, can inflate the false discovery rate. Traditional differential expression tools such as limma and classical phylogenetic comparative methods are each designed to tackle one of these challenges alone, but both fail in the context of interspecies RNA-seq data. If your experiment compares small RNA expression across species, consult a specialist about tools that account for phylogenetic correlations.
Professional Escalation Criteria
Some analysis situations require consultation with a bioinformatics specialist or a statistician. Recognize these situations early and seek help instead of proceeding with an inappropriate analysis.
Escalate to a specialist if you observe any of the following:
- Library sizes vary by more than a factor of 10 across samples, and the low-coverage samples are essential to the experimental design
- The multi-dimensional scaling plot shows strong clustering by batch instead of by condition, and the batch effect cannot be modeled with the available metadata
- The normalization factors from TMM or DESeq2 deviate from 1 by more than 50 percent for any sample
- The dispersion estimates are extremely high or the model fails to converge
- The results differ substantially between edgeR and DESeq2, and the discrepancy cannot be explained by the normalization method
- The experiment has fewer than three biological replicates per condition, and the results will be used for regulatory or clinical decisions
- The small RNA data come from biofluids and contain a complex mixture of human and non-human RNAs that require specialized filtering
- The experiment involves interspecies comparisons where phylogenetic correlations may inflate the false discovery rate
A specialist can help with more advanced approaches such as using small RNA-specific differential expression tools, modeling phylogenetic correlations for interspecies comparisons, or applying regularized models for sparse gene selection. The EMBL-EBI Training resources provide learning pathways that can help you build the skills needed to address these advanced scenarios.
Safety and Ethical Context
Small RNA-seq data may contain human genetic information if the samples come from human subjects. Handling these data requires attention to privacy and consent. The NCBI Data Resources provide information about data submission and access policies for human sequencing data. If your data come from human subjects, ensure that your analysis complies with the consent agreements and data protection regulations that apply to your institution and jurisdiction.
For animal studies, small RNA-seq data may be subject to institutional animal care and use committee requirements. The analysis itself does not involve animal handling, but the data come from animal experiments that must have been approved by the appropriate oversight body. When publishing results, include the relevant approval identifiers and follow the reporting guidelines for your field.
Decision Framework for Selecting Differential Expression Tools and Normalization Strategies
Choosing the correct combination of normalization and differential expression testing for small RNA-seq data requires a structured decision process instead of a default workflow. The benchmark evidence for microRNA sequencing data shows that method performance depends on data characteristics, experimental design, and the biological question. This section provides a practical decision framework that you can apply before running any analysis, with explicit criteria for tool selection, normalization strategy, and result validation.
Step 1: Characterize Your Data Distribution
Before selecting tools, quantify the features of your count matrix that influence method performance. Run these diagnostic checks and record the outputs in your analysis notebook.
Compute the proportion of reads in the top 10 features:
top10_prop <- sum(sort(rowSums(counts), decreasing = TRUE)[1:10]) / sum(counts)
Compute the number of features with zero counts in all samples:
zero_features <- sum(rowSums(counts) == 0)
Compute the coefficient of variation of library sizes:
lib_cv <- sd(colSums(counts)) / mean(colSums(counts))
Record these three values alongside your sample size per condition. The decision rules below use these values to guide method selection.
Step 2: Apply the Normalization Decision Rules
The benchmark study comparing normalization methods for microRNA sequencing data found that within-sample scaling with reads per million best preserved expected expression trends. Cross-sample methods such as TMM, rlog, and VST sometimes recovered apparent monotonicity among abundant microRNAs, but individual profile inspection suggested likely over-correction. Apply these rules in order:
Rule 1: Dominant feature proportion. If the top 10 features account for more than 60 percent of total reads, use RPM normalization without cross-sample scaling factors. This distribution is typical for small RNA-seq data where a few highly abundant microRNAs dominate the library. Cross-sample methods will attempt to correct for composition differences that reflect genuine biology instead of technical artifacts.
Rule 2: Library size variation. If the coefficient of variation of library sizes exceeds 0.3, use RPM normalization and verify that no single sample drives the variation. Examine the library size distribution with summary(colSums(counts)). A sample with a library size an order of magnitude lower than others may need exclusion before normalization.
Rule 3: Cross-sample method comparison. Run both RPM and TMM normalization and compare the normalization factors:
dge_rpm <- calcNormFactors(dge_filtered, method = "none")
dge_tmm <- calcNormFactors(dge_filtered, method = "TMM")
ratio <- dge_tmm$samples$norm.factors / dge_rpm$samples$norm.factors
If any ratio exceeds 1.5 or falls below 0.67, the TMM normalization is applying substantial correction. The benchmark evidence suggests this correction is likely over-correction in small RNA data. Use the RPM results as primary and report the TMM comparison as a sensitivity analysis.
Rule 4: DESeq2 normalization override. If you use DESeq2, apply RPM normalization before creating the DESeqDataSet object. The benchmark study showed that applying RPM-based normalization substantially improved the performance of cross-sample methods, including DESeq2. The default median-of-ratios normalization tends to systematically underestimate log2 fold changes in small RNA-seq data.
Step 3: Select the Differential Expression Testing Method
The benchmark study found that edgeR consistently ranked among the best-performing methods across several metrics, including log2 fold-change estimation, with performance comparable to microRNA-seq-specific tools such as miRglmm and NBSR. DESeq2, edgeR-v4, and limma-based approaches tended to systematically underestimate log2 fold changes.
Use these selection criteria based on your experimental design:
Two-group comparison with three to five replicates per condition. Use edgeR with the exact test after RPM normalization. This is the simplest and best-supported configuration for small RNA-seq data. The exact test does not require a design matrix and is appropriate when you have a single factor with two levels.
Multifactor design with covariates. Use edgeR with the generalized linear model approach and glmQLFTest. Include batch, sex, or other covariates in the design matrix. The quasi-likelihood F-test provides robust inference when dispersion is variable across features.
Experiments requiring fold-change shrinkage. If you need conservative fold-change estimates for ranking or validation prioritization, use DESeq2 with RPM-normalized counts. The shrinkage estimation for dispersions and fold changes improves stability and interpretability of estimates, as described in the DESeq2 method paper. Be aware that fold changes will be compressed relative to edgeR.
Small RNA-specific tools. If your data come from biofluids or contain complex mixtures of RNA types, consider miRglmm or NBSR as alternatives. These tools are designed for microRNA sequencing data characteristics. The benchmark evidence shows they perform comparably to edgeR. Tools such as sRNAflow and miND provide integrated pipelines that handle contaminant filtering, small RNA classification, and differential expression in a single workflow.
Step 4: Validate with a Method Agreement Check
After running your primary analysis, run a second method and compare the results. This agreement check identifies features whose significance depends on the statistical approach.
Run edgeR and DESeq2 with RPM normalization as described in the main workflow. Extract the significant feature lists using the same thresholds:
sig_edgeR <- rownames(results_edgeR_table)[results_edgeR_table$FDR < 0.05 & abs(results_edgeR_table$logFC) > 1]
sig_DESeq2 <- rownames(results_DESeq2)[results_DESeq2$padj < 0.05 & abs(results_DESeq2$log2FoldChange) > 1]
Compute the overlap:
overlap <- intersect(sig_edgeR, sig_DESeq2)
overlap_proportion <- length(overlap) / length(unique(c(sig_edgeR, sig_DESeq2)))
Interpret the overlap proportion using these criteria:
- Overlap above 0.7 indicates robust results. Proceed with the edgeR list as primary.
- Overlap between 0.4 and 0.7 indicates moderate agreement. Examine features significant in only one method by plotting their individual sample counts. Features with consistent within-condition counts and clear between-condition separation are likely true positives missed by one method due to normalization differences.
- Overlap below 0.4 indicates a serious method discrepancy. Return to the normalization comparison in Step 2 and examine whether the dominant feature proportion or library size variation is driving the difference. Escalate to a specialist if the discrepancy persists after normalization correction.
Step 5: Record the Decision Trail
Document each decision with its rationale in your analysis notebook. The nf-core documentation emphasizes community pipeline standards for reproducible workflow configuration, and the Bioconductor project provides tools for reproducible genomic analysis. Record:
- The top 10 feature proportion and whether it triggered Rule 1
- The library size coefficient of variation and whether it triggered Rule 2
- The normalization factor ratios from the TMM comparison
- The differential expression method selected and the reason
- The overlap proportion from the method agreement check
- Any features that required individual examination
This decision trail allows another researcher to understand why you chose specific methods and to assess whether those choices were appropriate for your data characteristics.
Common Decision Errors
Three recurring errors undermine tool selection for small RNA-seq data.
Error 1: Applying mRNA-seq defaults without examination. Many researchers use DESeq2 with default normalization or edgeR with TMM normalization because these are standard for mRNA-seq. The benchmark evidence shows these defaults perform poorly for small RNA-seq data. Always run the diagnostic checks in Step 1 before committing to a normalization strategy.
Error 2: Choosing tools based on familiarity instead of data characteristics. If your data have a dominant feature proportion above 60 percent, no amount of cross-sample normalization correction will fix the composition effect. The correct response is RPM normalization, not a more complex normalization method. Similarly, if you have a multifactor design, the exact test is inappropriate regardless of how comfortable you are with it.
Error 3: Ignoring the method agreement check. Running only one method and reporting its results without cross-validation leaves you vulnerable to method-specific artifacts. The benchmark study showed that different methods produce systematically different fold-change estimates for the same data. The agreement check is a low-cost validation step that identifies problematic features before you invest time in biological interpretation.
When to Use Specialized Pipelines
For biofluid samples or experiments with complex small RNA mixtures, consider using a dedicated pipeline instead of a manual R workflow. The sRNAflow tool addresses challenges including filtering potential RNAs from reagents and environment, classifying small RNA types, managing small RNA annotation overlap, conducting differential expression assays, and analysing isomiRs. The miND pipeline provides an easy-to-setup configuration sheet and an automatically generated comprehensive report containing essential qualitative and quantitative results, with a focus on microRNAs while including other RNA species such as tRNAs, piRNAs, snRNAs, and snoRNAs.
These pipelines are appropriate when your samples contain RNA from multiple species or when you need standardized reporting for biomarker discovery studies. They are less appropriate when you need fine-grained control over every analysis step or when your experimental design requires custom model formulas.
Escalation Criteria for Method Selection
Escalate to a bioinformatics specialist if you encounter any of these situations during method selection:
- The top 10 feature proportion exceeds 80 percent, and you cannot determine whether the dominant features are biological or technical artifacts
- The library size coefficient of variation exceeds 0.5, and low-coverage samples are essential to the experimental design
- The normalization factor ratios from the TMM comparison exceed 2.0 for any sample
- The method agreement overlap is below 0.4 after applying RPM normalization to both methods
- Your experiment involves interspecies comparisons where phylogenetic correlations may inflate the false discovery rate, as described in the phyloDE method paper
- Your data come from blood samples processed with bioinformatic globin depletion, which substantially reduces library sizes and captures fewer small RNA species
A specialist can help with small RNA-specific tools, regularized models for sparse feature selection, or phylogenetic comparative methods. The EMBL-EBI Training resources provide learning pathways that can help you build the skills needed to address these advanced scenarios.
Frequently Asked Questions
What is the minimum number of biological replicates needed for small RNA-seq differential expression analysis?
Three biological replicates per condition is the practical minimum for estimating biological variability, but five or more replicates substantially improve the reliability of results. Studies using subsampled RNA-seq experiments found that underpowered experiments are unlikely to replicate well, and cohorts with more than five replicates achieve high median precision despite low recall and replicability. If you cannot add more replicates, interpret your results with caution and validate the top candidates with an independent method.
Why should I use RPM normalization instead of TMM or DESeq2's default normalization for small RNA-seq data?
A benchmark study using realistic ground-truth microRNA sequencing data found that within-sample scaling with RPM best preserved expected expression trends. Cross-sample methods such as TMM, rlog, and VST sometimes recovered apparent monotonicity among abundant microRNAs, but individual profiles suggested likely over-correction. Applying RPM normalization substantially improved the performance of cross-sample methods, highlighting the strong influence of normalization on differential expression analysis.
Can I use DESeq2 for small RNA-seq differential expression analysis?
Yes, but apply RPM normalization before creating the DESeqDataSet object. The benchmark study found that DESeq2 tended to systematically underestimate log2 fold changes when used with its default normalization on small RNA-seq data. Applying RPM-based normalization substantially improved the performance of cross-sample methods, including DESeq2.
How do I choose between edgeR and DESeq2 for small RNA-seq data?
The benchmark evidence supports edgeR as one of the best-performing methods for small RNA-seq differential expression, with performance comparable to small RNA-specific tools. DESeq2 can be used with RPM normalization but tends to underestimate fold changes. A practical approach is to run both methods and compare the results, focusing on features that are significant in both analyses.
What should I do if my results differ substantially between edgeR and DESeq2?
Examine the normalization factors from both methods. If DESeq2's size factors or edgeR's TMM normalization factors deviate substantially from 1, the discrepancy is likely due to normalization. Re-run the analysis with RPM normalization for both methods and compare again. If the discrepancy persists, examine individual sample counts for the affected features and consider whether a batch effect or an outlier sample is driving the difference.
How do I handle small RNA-seq data from biofluids that contain contaminating RNAs?
Biofluid samples contain a complex mixture of small RNAs from human and other species, including bacteria, fungi, and viruses. Filtering these contaminants is a formidable challenge. Tools such as sRNAflow address this by filtering potential RNAs from reagents and environment, classifying small RNA types, and managing small RNA annotation overlap. Consider using a dedicated small RNA analysis pipeline for biofluid samples.
What is an improper expression profile and why might standard tools miss it?
An improper expression profile is a feature whose disease association arises at both low and high expression levels, instead of a monotonic mean shift between conditions. Standard differential expression tools are primarily optimized to detect monotonic mean shifts and may overlook these patterns. Receiver operating characteristic based indices such as the generalized area under the curve and the length of the ROC curve can support exploratory screening and prioritization of improper expression profiles as a complement to conventional methods.
How do I report the results of a small RNA-seq differential expression analysis?
Report the versions of R and all packages used, the count matrix source, the filtering threshold and number of features retained, the normalization method, the differential expression method and model formula, the significance thresholds, and the number of significant features. Provide the full results table as a supplementary file so that other researchers can reanalyze the data. The nf-core documentation and Bioconductor project provide guidance on reproducible workflow configuration and reporting standards.
Related Bioinformatics Guides
- RNA Sequencing Data Analysis: From Raw Reads to Differential Expression
- Proteomics Data Analysis in R: A Practical Workflow for Differential Expression and Visualization
- RNA-Seq Data Analysis in Galaxy: A User-Friendly Platform
- RNA-Seq Data Analysis Workflow: From Raw Reads to Insights
- Alternative Splicing Analysis from RNA-Seq Data
Related Clinical & Scientific Guides
- A Practical Guide to Detecting Antimicrobial Resistance Genes in Shotgun Metagenomic Data
- Computational Immunology: Modeling the Immune System
- How to Set Hard Filters for Germline Variant Calling: A Practical Guide to GATK Best Practices
References and Further Reading
- NCBI Data Resources. National Center for Biotechnology Information.
This article is educational and does not replace validated analysis plans, institutional policy, clinical interpretation, or specialist review.