Generate Volcano Plots for Longitudinal Taxa Abundance Volatility Test
Source:R/generate_taxa_volatility_volcano_long.R
generate_taxa_volatility_volcano_long.Rd
Generate Volcano Plots for Longitudinal Taxa Abundance Volatility Test
Arguments
- data.obj
A list object in a format specific to MicrobiomeStat, which can include components such as feature.tab (matrix), feature.ann (matrix), meta.dat (data.frame), tree, and feature.agg.list (list).
- group.var
The grouping variable tested, found in metadata.
- test.list
The list of test results returned by generate_taxa_volatility_test_long.
- feature.sig.level
The significance level cutoff for highlighting taxa.
- feature.mt.method
Multiple testing correction method, "fdr" or "none".
- features.plot
A character vector of feature names to be plotted. If NULL, all features will be plotted.
- palette
An optional parameter specifying the color palette to be used for the plot. It can be either a character string specifying the name of a predefined palette or a vector of color codes in a format accepted by ggplot2 (e.g., hexadecimal color codes). Available predefined palettes include 'npg', 'aaas', 'nejm', 'lancet', 'jama', 'jco', and 'ucscgb', inspired by various scientific publications and the `ggsci` package. If `palette` is not provided or an unrecognized palette name is given, a default color palette will be used. Ensure the number of colors in the palette is at least as large as the number of groups being plotted.
Boolean; whether to save the plot as a PDF file.
- pdf.wid
Numeric; width of the saved PDF file.
- pdf.hei
Numeric; height of the saved PDF file.
Examples
if (FALSE) { # \dontrun{
data("subset_T2D.obj")
test.list <- generate_taxa_volatility_test_long(
data.obj = subset_T2D.obj,
time.var = "visit_number",
subject.var = "subject_id",
group.var = "subject_race",
adj.vars = "sample_body_site",
prev.filter = 0.1,
abund.filter = 0.0001,
feature.level = c("Order", "Family", "Genus"),
feature.dat.type = "count",
transform = "CLR"
)
plot.list <- generate_taxa_volatility_volcano_long(data.obj = subset_T2D.obj,
group.var = "subject_race",
test.list = test.list,
feature.sig.level = 0.1,
feature.mt.method = "none")
data("ecam.obj")
test.list <- generate_taxa_volatility_test_long(
data.obj = ecam.obj,
time.var = "month_num",
subject.var = "subject.id",
group.var = "antiexposedall",
adj.vars = "delivery",
prev.filter = 0.1,
abund.filter = 0.0001,
feature.level = c("Order", "Family", "Genus"),
feature.dat.type = "proportion",
transform = "CLR"
)
plot.list <- generate_taxa_volatility_volcano_long(
data.obj = ecam.obj,
group.var = "antiexposedall",
test.list = test.list,
feature.sig.level = 0.1,
feature.mt.method = "none"
)
} # }