DESeq2 Differential Expression Analysis
NotchBio runs DESeq2 on gene-level counts to test which genes change between experimental levels. The analysis stores the design formula, input quantification version, comparisons, significance threshold, result tables, and plots as one reproducible pipeline version.
DESeq2 Requirements Before You Run
Section titled “DESeq2 Requirements Before You Run”Your project needs:
- A completed Salmon or STAR quantification version for the samples in the analysis.
- A primary variable—Group/Condition, Cell Line, or Batch—assigned to every included sample.
- At least two levels in the primary variable so DESeq2 has a comparison to test.
- At least two biological replicates in every primary-variable level. Three or more is a stronger practical minimum.
- Values for every selected blocking variable on every included sample.
Technical replicates do not replace biological replication. If condition and batch are perfectly confounded—for example, all controls were sequenced in batch 1 and all treatments in batch 2—DESeq2 cannot separate the biological effect from the batch effect.
How to Run DESeq2 in NotchBio
Section titled “How to Run DESeq2 in NotchBio”- Open the project and go to Run → DESeq2 design.
- Select the completed Salmon or STAR version that contains the counts you want to test.
- Choose the primary variable whose levels define the biological comparisons.
- Add optional blocking variables such as batch or cell line.
- Review the generated design formula and planned pairwise comparisons.
- Choose the independent-filtering alpha/FDR target (0.05 is the standard option).
- Resolve any missing metadata, replication, or design-capacity warnings.
- Start the run and select the completed version to review its results.
NotchBio generates pairwise comparisons between the levels of the selected primary variable. The comparison label tells you which level is measured relative to the other; always read it before interpreting the sign of log2FoldChange.
Primary and Blocking Variables Explained
Section titled “Primary and Blocking Variables Explained”The primary variable is the factor you want to test. Blocking variables account for known nuisance variation without becoming the main comparison.
| Design question | Primary variable | Blocking variable(s) | Formula example |
|---|---|---|---|
| Treatment vs control | Group/Condition | None | ~ group |
| Treatment vs control across sequencing batches | Group/Condition | Batch | ~ batch + group |
| Treatment effect across cell lines | Group/Condition | Cell Line | ~ cell_line + group |
| Cell-line differences controlling for batch | Cell Line | Batch | ~ batch + cell_line |
Adding batch to the design models the batch effect during statistical inference; it does not rewrite the raw count matrix or guarantee that a PCA plot will stop clustering by batch. Do not use a visually corrected matrix as DESeq2 input unless your statistical method explicitly supports that workflow.
How to Interpret DESeq2 Results
Section titled “How to Interpret DESeq2 Results”The downloadable result table contains the core DESeq2 statistics:
- baseMean: mean normalized expression across the samples in the comparison.
- log2FoldChange: effect size and direction. A value of
1is a two-fold increase;-1is a two-fold decrease relative to the comparison baseline. - lfcSE: uncertainty of the estimated log2 fold change.
- stat: Wald test statistic used to test the coefficient.
- pvalue: unadjusted probability from the statistical test.
- padj: p-value corrected for testing thousands of genes. Use this for significance decisions.
An adjusted p-value below 0.05 is a common statistical threshold, but it is not a biological effect-size threshold. Report the FDR and the log2 fold-change rule you chose, and inspect expression levels and replicate consistency before promoting a gene as a result.
DESeq2 Plots in NotchBio
Section titled “DESeq2 Plots in NotchBio”Volcano Plot
Section titled “Volcano Plot”The volcano plot shows effect size on the x-axis and statistical evidence on the y-axis. Use it to find genes that are both well supported and meaningfully changed. A dramatic y-value with a tiny fold change may be statistically reliable without being biologically important.
MA Plot
Section titled “MA Plot”The MA plot shows log2 fold change against average expression. Look for increased scatter among low-count genes, systematic asymmetry, and unstable large effects. Fold-change shrinkage is especially helpful for noisy low-count genes.
PCA Plot
Section titled “PCA Plot”PCA summarizes the largest sources of variation across samples. Replicates should be biologically plausible, but separation is not a formal significance test. Clustering by batch, cell line, or another known factor can explain why that factor belongs in the design.
Heatmap and VST Matrix
Section titled “Heatmap and VST Matrix”The heatmap helps identify sample clusters and outliers among variable or significant genes. The VST matrix is useful for visualization and clustering; it is not a replacement for raw integer counts in the DESeq2 model.
Common DESeq2 Errors and How to Fix Them
Section titled “Common DESeq2 Errors and How to Fix Them”“At Least 2 Biological Replicates”
Section titled ““At Least 2 Biological Replicates””One or more levels has fewer than two independent samples. Add valid biological replicates or change the primary variable. Do not duplicate a sample or treat lanes from the same library as independent replicates.
Missing Group, Cell Line, or Batch Values
Section titled “Missing Group, Cell Line, or Batch Values”Assign the selected variable to every included sample. A blocking variable with missing values makes the design incomplete.
Not Enough Samples for the Design
Section titled “Not Enough Samples for the Design”The design has too many levels or covariates for the number of samples. Simplify the question, add samples, or remove a blocking variable only when the experimental design supports that decision.
Condition Is Confounded with Batch
Section titled “Condition Is Confounded with Batch”No model can recover a treatment effect when treatment and batch always change together. The reliable fix is experimental: distribute conditions across batches or include shared anchor samples before sequencing.
Many padj Values Are NA
Section titled “Many padj Values Are NA”Low-count independent filtering and outlier handling can produce missing adjusted p-values. Inspect baseMean, sample-level counts, and replicate behavior before changing filtering rules.
What to Report in an RNA-Seq Methods Section
Section titled “What to Report in an RNA-Seq Methods Section”Record the count-generation method and version, DESeq2 version, input samples, design formula, primary and blocking variables, comparisons, alpha/FDR threshold, fold-change shrinkage method, independent filtering behavior, and any additional effect-size cutoff. NotchBio stores the input version and parameters with each run so the result can be traced back through preprocessing and quantification.
For the statistical model, read How DESeq2 Actually Works (Without the Math Overload). For complex designs, see DESeq2 Contrasts: Multiple Conditions and Multi-Factor Designs.