Create a volcano plot of differential expression results.
volcanoPlot(
x,
palettePoint,
maxOverlaps,
sizeLabel,
Th_logFC,
Th_Pvalue,
subsetGenes,
st_significance
)
A "ggplot" object displaying the volcano plot.
Character. File path to a CSV containing DEG results, with at least columns "ID", "logFC", and one of "PValue", "FDR", or "FWER".
Character. Name of a discrete palette from the "paletteer" package, supplying colors for "UP", "DOWN", and "NO".
Integer. Maximum allowed label overlaps passed to "ggrepel::geom_text_repel()".
Numeric. Font size for gene labels in the plot.
Numeric. Absolute log2 fold-change threshold to call a gene "UP" or "DOWN".
Numeric. P-value threshold to call significance (uses "FDR"/"FWER" if "st_significance = "adjustPvalue"", otherwise raw "PValue").
Integer or "Inf". If numeric, only the top "subsetGenes" genes by p-value are shown and labeled.
Character. Which p-value column to use: "adjustPvalue" (FDR or FWER) or "PValue".
This function reads a CSV of DEGs, classifies genes as up/down/no change based on log-fold change and p-value thresholds, and plots –log10(p-value) versus log-FC using ggplot2.
Reads the input CSV and checks for duplicate IDs.
Standardizes columns to "ID", "logFC", and "adjustPvalue" or "PValue".
Optionally subsets to the top N genes by p-value.
Classifies each gene as "UP", "DOWN", or "NO" based on thresholds.
Plots points with manual fill, size, and alpha scales, adds threshold lines, and repels labels using "ggrepel".