bars_fun: Barplots plotly

View source: R/bars_fun.R

bars_funR Documentation

Barplots plotly

Description

Barplots plotly

Usage

bars_fun(
  data = data,
  rank = "Genus",
  top = 10,
  Ord1 = NULL,
  sample_labels = FALSE,
  split = FALSE,
  split_sid_order = FALSE,
  relative = TRUE,
  autoorder = TRUE,
  ylab = "Abundance",
  outfile = "plot_compo.html",
  verbose = TRUE
)

Arguments

data

a phyloseq object (output from decontam or generate_phyloseq)

rank

Taxonomy rank to merge features that have same taxonomy at a certain taxonomic rank (among rank_names(data), or 'ASV' for no glom)

top

Number of top taxa to plot

Ord1

Variable used to order sample (X axis) or split the barplot if split = TRUE

sample_labels

If true, x axis labels are sample IDS, if false labels displayed are levels from Ord1 argument. Ignored if split = TRUE (FALSE)

split

if TRUE make a facet_wrap like grouped by Ord1 (default FALSE)

relative

Plot relative (TRUE, default) or raw abundance plot (FALSE)

autoorder

Automatic ordering xaxis labels based on Ord1 factor levels with gtools::mixedorder function (TRUE).

ylab

Y axis title ("Abundance")

outfile

Output html file.

Value

Returns barplots in an interactive plotly community plot


erifa1/ExploreMetabar documentation built on Jan. 12, 2023, 1:51 a.m.