Plot a volcano plot for differential expression analysis.
plot_volcano(
devil.res,
lfc_cut = 1,
pval_cut = 0.05,
labels = TRUE,
colors = c("gray", "forestgreen", "steelblue", "indianred"),
color_alpha = 0.7,
point_size = 1,
center = TRUE,
title = "Volcano plot"
)
A data frame or tibble containing the results of differential expression analysis. This object is generated by the test_de
function.
A numeric value specifying the threshold for absolute log-fold change. Genes with absolute log-fold change greater than or equal to this value are highlighted. (default is 1
)
A numeric value specifying the threshold for adjusted p-value. Genes with adjusted p-value less than or equal to this value are highlighted. (default is 0.05
)
Logical indicating whether to label significant genes on the plot. (default is TRUE
)
A character vector specifying the colors to use for different classes of genes (e.g., "non-significant", "lfc", "p-value", "p-value and lfc").
Default colors are "gray"
, "forestgreen"
, "steelblue"
, and "indianred"
A numeric value specifying the alpha transparency level for point colors. (default is 0.7
)
A numeric value specifying the size of points in the plot. (default is 1
)
Logical indicating whether to center the x-axis at zero. (default is TRUE
)
A character string specifying the title of the plot. (default is Volcano plot
)
A ggplot
object representing the volcano plot.
This function creates a volcano plot for visualizing the results of differential expression analysis. It highlights genes based on their log-fold change (lfc
) and adjusted p-values (adj_pval
). Genes that meet the specified thresholds for both log-fold change and adjusted p-value are optionally labeled on the plot.
The function also ensures that genes with an adjusted p-value of zero are displayed with a minimal p-value (1e-16
) to avoid plotting issues.