Generate a Circular Cladogram with Heatmap for Taxa
Source:R/generate_taxa_cladogram_single.R
generate_taxa_cladogram_single.Rd
This function generates a circular cladogram with an integrated heatmap for taxonomic data. It visualizes the phylogenetic relationships between different taxa and their abundances or other coefficients across different taxonomic levels using a tree-like structure (cladogram).
Usage
generate_taxa_cladogram_single(
data.obj,
test.list,
group.var = NULL,
feature.level,
feature.mt.method = "none",
cutoff = 1,
color.group.level = NULL,
palette = NULL,
pdf = FALSE,
pdf.width = 10,
pdf.height = 10
)
Arguments
- data.obj
A list object in a format specific to MicrobiomeStat, which includes components like feature.tab, feature.ann, meta.dat, etc.
- test.list
A list of test results. If NULL, it will be generated using generate_taxa_test_single.
- group.var
The name of the grouping variable in meta.dat.
- feature.level
A character vector specifying taxonomic levels to be analyzed.
- feature.mt.method
Multiple testing method for features, "none" (default), "fdr", or other methods supported by p.adjust.
- cutoff
The p-value cutoff for significance.
- color.group.level
The taxonomic level used to color-code the branches of the cladogram.
- palette
An optional vector of colors to be used for the plot. If NULL, a default color palette will be used.
Boolean indicating whether to save the plot as a PDF.
- pdf.width
The width of the PDF file if saved.
- pdf.height
The height of the PDF file if saved.
Examples
if (FALSE) { # \dontrun{
data(subset_T2D.obj)
test.list <- generate_taxa_test_single(
data.obj = subset_T2D.obj,
time.var = "visit_number",
t.level = NULL,
group.var = "subject_race",
adj.vars = "subject_gender",
feature.level = c("Phylum", "Class", "Order", "Family", "Genus", "Species"),
feature.dat.type = "count",
prev.filter = 0.1,
abund.filter = 0.0001,
)
plot.list <- generate_taxa_cladogram_single(
data.obj = subset_T2D.obj,
test.list = test.list,
group.var = "subject_gender",
feature.level = c("Phylum", "Class", "Order", "Family", "Genus", "Species"),
feature.mt.method = "none",
cutoff = 0.9,
color.group.level = "Order"
)
test.list <- generate_taxa_test_single(
data.obj = subset_T2D.obj,
time.var = "visit_number",
t.level = NULL,
group.var = "subject_race",
adj.vars = "subject_gender",
feature.level = c("Order"),
feature.dat.type = "count",
prev.filter = 0.1,
abund.filter = 0.0001,
)
plot.list <- generate_taxa_cladogram_single(
data.obj = subset_T2D.obj,
test.list = test.list,
group.var = "subject_gender",
feature.level = c("Order"),
feature.mt.method = "none",
cutoff = 0.9,
color.group.level = "Order"
)
data(peerj32.obj)
test.list <- generate_taxa_test_single(
data.obj = peerj32.obj,
time.var = "time",
t.level = NULL,
group.var = "group",
adj.vars = "sex",
feature.level = c("Phylum","Family","Genus"),
feature.dat.type = "count",
prev.filter = 0.1,
abund.filter = 0.0001,
)
plot.list <- generate_taxa_cladogram_single(
data.obj = peerj32.obj,
test.list = test.list,
group.var = "group",
feature.level = c("Phylum", "Family", "Genus"),
cutoff = 0.3,
color.group.level = "Family"
)
} # }