Plots effect size against significance, with cutoff guides and optional
labels on the most significant genes. Shrunken log fold changes
(see DESeq2::lfcShrink()) give a more honest picture than raw ones,
because genes with very low counts otherwise produce large fold changes
that are almost entirely noise.
Arguments
- res
A
DESeqResultsobject or data frame withlog2FoldChangeandpadjcolumns, and optionallysymbol.- fdr
Adjusted p-value cutoff.
- lfc
Absolute log2 fold-change cutoff used for colouring and for the vertical guides.
- label_n
Number of top genes to label. Requires a
symbolcolumn and the ggrepel package; set to 0 to disable.
Value
A ggplot2::ggplot() object.
Examples
set.seed(1)
res <- data.frame(
log2FoldChange = rnorm(500),
padj = runif(500),
symbol = paste0("GENE", 1:500)
)
plot_volcano(res, label_n = 0)