plot_Volcano.RdGenerates volcano plots to visualize the results of differential expression analysis by plotting log2 fold changes against negative log10 adjusted p-values. The function creates plots for all pairwise group comparisons and applies significance thresholds to highlight upregulated, downregulated, and non-significant features.
plot_Volcano(
PPData,
FCData,
CAData,
arrangeLevels = NULL,
fcUP = 2,
fcDown = 0.5,
adjpvalue = 0.05,
show_plots = TRUE,
verbose = TRUE
)A list object returned by perform_PreprocessingPeakData().
Must contain a Metadata component with a Group column.
A list object returned by perform_FoldChange().
Must contain fold change data for group comparisons.
A list object returned by perform_ComparativeAnalysis().
Must contain a results component with p-values and adjusted p-values.
A character vector specifying the order of group levels.
Format: c('group1', 'group2', ...). If NULL (default),
groups are sorted alphabetically. Recommended order: control, case1, case2
(e.g., Control, Non-severe dengue, Severe dengue).
A numeric value specifying the upper fold change threshold for
significance. Features with fold change >= fcUP are considered
upregulated. Default: 2.
A numeric value specifying the lower fold change threshold for
significance. Features with fold change <= fcDown are considered
downregulated. Default: 0.5.
A numeric value specifying the adjusted p-value threshold for significance. Default: 0.05.
A logical value indicating whether to display plots.
Default: TRUE.
A logical value indicating whether to print progress messages.
Default: TRUE.
A list containing:
Character string identifying the source function
List of input parameters used
Named list of ggplot2 objects, one for each comparison
Data frame with complete volcano plot data for each comparison
Data frame with significant features only for each comparison
Summary statistics for each comparison
The function performs the following steps:
Validates input data structures and parameters
Extracts non-QC samples from the metadata
Creates all possible pairwise group comparisons
Merges fold change and statistical test results
Applies significance thresholds to classify features
Generates volcano plots with customizable thresholds
Returns comprehensive results including plots and data
Features are classified as:
Upregulated: Fold change >= fcUP AND adjusted p-value < adjpvalue
Downregulated: Fold change <= fcDown AND adjusted p-value < adjpvalue
Not Significant: All other features
if (FALSE) { # \dontrun{
# Basic usage with default parameters
volcano_results <- plot_Volcano(
PPData = preprocess_results,
FCData = foldchange_results,
CAData = comparative_results
)
# With custom thresholds and group ordering
volcano_results <- plot_Volcano(
PPData = preprocess_results,
FCData = foldchange_results,
CAData = comparative_results,
arrangeLevels = c("Control", "Treatment1", "Treatment2"),
fcUP = 1.5,
fcDown = 0.67,
adjpvalue = 0.01
)
# Access specific results
plot_obj <- volcano_results$VolcanoPlots[["Control vs. Treatment1"]]
sig_features <- volcano_results$VolcanoData_filtered_Control_vs._Treatment1
} # }