R/relabu_barplot.R
relabu_barplot.Rd
Plot bar plots of sample and group level relative abundance
A multi-assay experiment object
The taxon level used for organisms
A character list of organisms to send to top
Sort bars by one of c("nosort", "conditions", "organisms", "alphabetically")
A bool specifying whether to group samples
Group by one or more conditions e.g. "ALL" or "SEX"
Plot associatied conditions with samples.
Isolate specific samples e.g. c("SAM_01", "SAM_02")
Discard specific samples e.g. c("SAM_01", "SAM_02")
A bool specifying whether or not to show organisms legend
A plotly object
data_dir <- system.file("extdata/MAE.rds", package = "animalcules")
toy_data <- readRDS(data_dir)
p <- relabu_barplot(toy_data,
tax_level = "family",
order_organisms = c("Retroviridae"),
sort_by = "organisms",
sample_conditions = c("SEX", "AGE"),
show_legend = TRUE
)
p