plotAbundance: Plot relative abundance

View source: R/intra_functions.R

plotAbundanceR Documentation

Plot relative abundance

Description

This function plots the relative abundance of the top abundant features.

Usage

plotAbundance(
  aggdat,
  level,
  x_var = "SAMPLE_ID",
  ind = seq_len(10),
  plotTitle = "",
  ylab = "Reads",
  facet1 = NULL,
  facet2 = NULL,
  source = "A",
  pwidth = 650,
  pheight = 150
)

Arguments

aggdat

aggregated MRExperiment object

level

Feature level.

x_var

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

ind

Indices of top abundant features to plot. Rest of features are aggregated and displayed as "other".

plotTitle

Plot title. Default shows no title.

ylab

Y-axis label. Default is "Reads"

facet1

Phenotype for facet 1.

facet2

Phenotype for facet 2.

source

name of the plot (needed for event handling); default is "A"

pwidth

overall plot width; default is 650

pheight

overall plot height; default is 150

Value

plotly plot

Author(s)

Janina Reeder

Examples

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


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