PlotTaxaAundanceBar: Function to plot bar charts for alpha diversity

Description Usage Arguments Author(s)

View source: R/mdp_utils.R

Description

This functions plots bar charts of different taxonomic levels for alpha diversity.

Usage

1
2
PlotTaxaAundanceBar(mbSetObj, barplotName, taxalvl, metadata, facet,
  imgOpt, feat_cnt, colpalopt, calcmeth, format = "png", dpi = 72)

Arguments

mbSetObj

Input the name of the mbSetObj.

barplotName

Character, input the name of the barplot.

taxalvl

Character, input the taxonomic level to perform classification. For instance, "Genus" to use the Genus level.

metadata

If users wish to merge samples to groups in the stacked bar plot, set this to the preferred grouping.

facet

Character, set the group to separate the bar plots.

imgOpt

Character, set the graph type. Stacked bar using the actual abundance, use "barraw". Stacked bar using the percentage abundance, use "barnorm".

feat_cnt

Set the minimum feature count that is used to "bin" together small taxa.

colpalopt

Select the color palette options. "set3", which is the Set3 from the R Color Brewer, "cont21" which is a set of 21 colors, "cont28" which is a set of 28 colors, and "cont42" which is a set of 42 colors. For users who wish to use a color palette robust to colorblindness /(https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html/), use "viridis", "magma", "plasma", or "inferno".

calcmeth

Merge small taxa based on the sum /("sum"/) or median /("med"/) counts across all samples or groups.

format

Character, input the preferred format of the plot. By default it is set to "png".

dpi

Numeric, input the dots per inch. By default it is set to 72.

Author(s)

Jeff Xia [email protected] McGill University, Canada License: GNU GPL (>= 2)


xia-lab/MicrobiomeAnalystR documentation built on Oct. 17, 2019, 9:05 a.m.