Exercise 9 — Interpreting DESeq2 Results and Prioritizing Candidate Genes
Exercise 9 — Interpreting DESeq2 Results and Prioritizing Candidate Genes
In Exercise 8, we performed a full differential expression analysis using DESeq2.
We now have a table containing:
- log2FoldChange
- p-value
- adjusted p-value
- mean expression
But a common challenge in RNA-seq analysis is:
We have thousands of significant genes. Which ones matter?
In this exercise, you will learn how to:
- interpret DESeq2 results
- prioritize genes
- create publication-style volcano plots
- identify candidate biomarkers
- think critically about differential expression results
Part 1 — Load Previous Results
Use your DESeq2 object from Exercise 8.
res <- results(dds)
res_df <- as.data.frame(res)
Part 2 — Understanding DESeq2 Output
Task 2.1
Inspect:
head(res_df)
Answer:
- What does log2FoldChange represent?
- What does pvalue represent?
- What does padj represent?
- Why is padj preferred over pvalue?
Task 2.2
Interpret the following hypothetical genes:
Gene A
log2FC = 3
padj = 0.001
Questions:
- Upregulated or downregulated?
- Strong or weak effect?
- Significant or not?
Gene B
log2FC = 0.2
padj = 1e-12
Questions:
- Significant?
- Biologically interesting?
- Why or why not?
Gene C
log2FC = 2.5
padj = 0.4
Questions:
- Large effect?
- Reliable finding?
- Would you prioritize it?
Part 3 — Significant Genes
Task 3.1
Identify:
padj < 0.05
How many genes are significant?
Task 3.2
Identify:
padj < 0.05 &
abs(log2FoldChange) > 1
How many genes pass both criteria?
Task 3.3
Why might researchers use both thresholds?
Part 4 — Ranking Candidate Genes
Task 4.1
Sort by:
padj
Display:
Top 20 genes
Task 4.2
Sort by:
abs(log2FoldChange)
Display:
Top 20 genes
Task 4.3
Compare both lists.
Questions:
- Are they the same?
- Why not?
- Which ranking is more useful?
Part 5 — Volcano Plot
Task 5.1
Create:
volcano_df <- res_df
Task 5.2
Add significance label:
volcano_df$Significant <- ifelse(
volcano_df$padj < 0.05,
"Yes",
"No"
)
Task 5.3
Create volcano plot
library(ggplot2)
ggplot(
volcano_df,
aes(
x = log2FoldChange,
y = -log10(padj),
color = Significant
)
) +
geom_point()
Task 5.4
Interpret:
- What is the x-axis?
- What is the y-axis?
- What does the upper-right corner represent?
- What does the upper-left corner represent?
Part 6 — Improved Volcano Plot
Task 6.1
Add threshold lines:
padj = 0.05
and
log2FC = ±1
using:
geom_hline()
geom_vline()
Task 6.2
Questions:
- Which genes would you prioritize?
- Which region contains strongest candidates?
Part 7 — Candidate Biomarker Selection
Suppose your PI asks:
Give me 5 genes to validate experimentally.
Task 7.1
Create:
candidate_genes
using:
padj < 0.05
and
abs(log2FoldChange) > 2
Task 7.2
Select your top 5 candidates.
Task 7.3
Justify each choice.
Consider:
- significance
- fold change
- expression level
Part 8 — Mean Expression Matters
A common mistake is selecting genes based only on fold change.
Task 8.1
Add:
baseMean
to your ranking strategy.
Task 8.2
Questions:
Why might a gene with:
log2FC = 4
be difficult to validate if:
baseMean = 2
?
Part 9 — Gene Prioritization Table
Create a summary table containing:
- Gene
- baseMean
- log2FoldChange
- padj
Sort by:
padj
Display top 20 genes.
Part 10 — Analyst Interpretation
Answer:
# What is the difference between statistical significance and biological significance?
# Why is fold change important?
# Why is adjusted p-value important?
# What makes a strong biomarker candidate?
# Which genes would you prioritize for validation?
Part 11 — Mini Report
Write 5–10 sentences summarizing:
- Number of significant genes
- Major findings
- Volcano plot observations
- Candidate genes
- Recommended validation targets
Imagine presenting these results at a lab meeting.
Bonus Challenge
B1
Label the top 10 genes on the volcano plot.
Hint:
library(ggrepel)
B2
Colour genes using:
- Upregulated
- Downregulated
- Not significant
instead of simple Yes/No.
B3
Create a publication-style volcano plot.
Add:
- clean theme
- labels
- thresholds
- title
⬅️ Previous Exercise | 🏠 Home | ➡️ Next Exercise