This skill covers creating publication-quality visualizations for differential expression results, including MA plots, volcano plots, PCA plots, and heatmaps. Works with both DESeq2 and edgeR output.
install.packages(c('ggplot2', 'pheatmap', 'RColorBrewer', 'ggrepel'))
BiocManager::install('EnhancedVolcano') # Optional
Tell your AI agent what you want to do: - "Create a volcano plot from my DESeq2 results" - "Make a heatmap of the top 50 differentially expressed genes" - "Generate a PCA plot colored by treatment group"
"Create an MA plot highlighting significant genes"
"Make a volcano plot with gene labels for top hits"
"Generate an EnhancedVolcano plot for my results"
"Show PCA of my samples colored by condition and shaped by batch"
"Create a sample distance heatmap"
"Plot MDS for my edgeR data"
"Make a heatmap of significant genes clustered by expression"
"Create a heatmap for my genes of interest"
"Show expression patterns across samples"
"Plot counts for gene X across conditions"
"Show expression of my candidate genes"
| Plot | Shows | Use For |
|---|---|---|
| MA plot | LFC vs expression | QC, global view |
| Volcano | LFC vs significance | Identifying top genes |
| PCA | Sample relationships | Batch effects, outliers |
| Heatmap | Expression patterns | Gene clusters, validation |
vst() function default is blind=TRUE; the current DESeq2 vignette recommends blind=FALSE for downstream visualization after the model is fit -- pass blind= explicitlyscale='none' insteadmax.overlaps = Inf (or options(ggrepel.max.overlaps = Inf)) when labeling more than ~10 genes -- ggrepel's default silently drops labelsmatrixStats::rowMads(assay(vsd)) instead of rowVars -- one outlier sample can inflate rowVars massively