plotAlpha: Plot alpha diversity

Description Usage Arguments Value Examples

View source: R/intra_functions.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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

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

microbiomeExplorer documentation built on Nov. 8, 2020, 8:16 p.m.