plotStackedBars: Plot stacked abundace barplots

View source: R/plotStackedBars.R

plotStackedBarsR Documentation

Plot stacked abundace barplots

Description

Plot stacked abundace barplots

Usage

plotStackedBars(
  dataset = NULL,
  relative = T,
  factor = NULL,
  stratify = F,
  bySample = F,
  allSamples = F,
  paired_ids = c(),
  unfiltered = T,
  label_unknown = T,
  rank = NA,
  top = 15,
  top_by = "mean",
  ftlist = c(),
  plotSigs = F,
  alpha = 0.05,
  separateLegend = F
)

Arguments

dataset

MicroVis dataset. Defaults to the active dataset

relative

Whether to plot relative abundance. Defaults to TRUE

factor

Factor to group samples by

stratify

Whether to stratify the groups. Defaults to FALSE

bySample

Whether to show a bar for each sample instead of aggregating samples by groups. Defaults to FALSE

allSamples

Whether to plot a single graph for all the samples in the dataset. Defaults to FALSE

paired_ids

Plot samples paired by "factor", with each pair having a unique combination of IDs determined by this variable (as a vector)

unfiltered

Whether to use data before or after filtering out features. Defaults to TRUE (uses data before filtering)

label_unknown

Whether to group unknown taxa separate. Defaults to TRUE

rank

Rank at which to use features

top

Number of features to show based on greatest relative abundance. Defaults to top 15 features by relative abundance

top_by

Select the top features either by the max, min, or mean relative abundance in the groups, or the summed relative abundance across all groups. Defaults to mean (in other words, for each feature its mean relative abundance values across the samples will be used to determine whether it is a top feature).

ftlist

(Optional) List of features to consider. Defaults to all features at the rank

plotSigs

Plot only the significant features? Defaults to FALSE

alpha

Significance threshold for selecting significant features. Defaults to 0.05

separateLegend

Whether to separate the legend from the plot. Defaults to FALSE

Value

Stacked bar plot of feature abundances of selected features with the other features lumped into an "Other" category


microresearcher/MicroVis documentation built on Feb. 8, 2024, 10:59 a.m.