plotAlpha: Plot alpha diversity

View source: R/intra_functions.R

plotAlphaR Documentation

Plot alpha diversity

Description

This function plots the alpha diversity. See ?vegan::diversity for details on the available index

Usage

plotAlpha(
  aggdat,
  level,
  index = c("shannon", "simpson", "invsimpson", "richness"),
  x_var = "SAMPLE_ID",
  ylab = index,
  col_by = NULL,
  facet1 = NULL,
  facet2 = NULL,
  plotTitle = "",
  pwidth = 500,
  pheight = 150
)

Arguments

aggdat

aggregated MRExperiment

level

Feature level

index

Diversity index, one of "shannon", "simpson", "invsimpson" or "richness" (=number of features). Default is "shannon".

x_var

Phenotype to aggregate over on X-axis. Default by "SAMPLE_ID".

ylab

Y-axis label. Default is "Reads".

col_by

Phenotype for coloring.

facet1

Phenotype for facet 1.

facet2

Phenotype for facet 2.

plotTitle

Plot title. By default, no title is used.

pwidth

overall plot width; default is 650

pheight

overall plot height; default is 150

Value

plotly plot object

Examples

data("mouseData", package = "metagenomeSeq")
aggdat <- aggFeatures(mouseData, level = "genus")
plotAlpha(aggdat, level = "genus", index = "shannon", x_var = "diet")


zoecastillo/microbiomeExplorer documentation built on Sept. 11, 2022, 7:40 a.m.