R/aldex_volcano_plot.R
aldex_volcano_plot.RdThis function generates either an effect size plot or a volcano plot based on ALDEx2 results.
aldex_volcano_plot(
table,
metadata,
col_cond,
type = "volcano",
col_inf = "blue",
col_sup = "red",
threshold_lower = -1.5,
threshold_upper = 1.5,
cond = NULL,
cutoff.pval = 0.05,
show_labels = TRUE,
taxa = NULL,
save_table = TRUE,
table_filename = "aldex_pval_effect.txt"
)Data frame with count data; columns represent samples, rows represent features.
Data frame containing metadata for the samples.
Name of the column in metadata that contains the experimental conditions.
Type of plot to generate: "effect" for effect size plot or "volcano" for volcano plot.
Color for points with effect size/difference lower than threshold (default for "effect" plot).
Color for points with effect size/difference higher than threshold (default for "effect" plot).
Lower threshold for effect size/difference (x-axis).
Upper threshold for effect size/difference (x-axis).
Name of the condition that appears first in table (used in plot labels).
p-value cutoff for significance (default = 0.05).
Logical. Whether to display "Higher/Lower in cond" labels (for "effect" plot only, default is TRUE).
Data frame with taxonomic information (required for "volcano" plot only).
A ggplot object with the selected plot.
aldex_volcano_plot(table = table,
metadata = metadata,
col_inf = "blue",
col_sup = "red",
col_cond = "metodo",
type = "effect",
threshold_lower = -1,
threshold_upper = 1,
cond = "kit",
show_labels = TRUE)
#> Warning: package 'ggtext' was built under R version 4.4.3
#> Error: object 'metadata' not found