physeq.mra.prevalence: Relative abundance Summary and Conversion

physeq.mra.prevalenceR Documentation

Relative abundance Summary and Conversion

Description

A comprehensive relative abundance function for phyloseq objects. Includes output of relative abundance summary statistics (mean relative abundance and prevalence), both as a dataframe and with an added option for plotting. The function accepts input of count or relative abundance data.

Usage

physeq.mra.prevalence(physeq, type, vis.export = TRUE, export_prefix.in)

Arguments

physeq

Input phyloseq object

type

One of "counts" or "relabund". Describes whether input phyloseq object currently contains raw counts or relative abundance.

vis.export

TRUE or FALSE. If "TRUE", the function save plots to the working directory describing distribution of taxa relative abundance and prevalence.

export_prefix.in

Provide a prefix (string) for summary plots if vis.export = TRUE

Details

If count data is input, it will be first converted to relative abundance. The relative abundance phyloseq object and OTU table will also be returned.

Value

List containing [1] mean relative abundance and prevalence for each taxa (dataframe) [2] Relative abundance OTU table (dataframe) [3] Relative abundance phyloseq object. If vis.export = TRUE Will also export summary plots of mean relative abundance and prevalence distributions to working directory

Examples

physeq.mra.prevalence(physeq = dat, type = "counts", vis.export = TRUE, export_prefix.in = "test_counts") #with export
physeq.mra.prevalence(physeq = dat_rel, type = "relabund") #input phyloseq object with relative abundance

SarahAsbury/retainresolve documentation built on Feb. 20, 2023, 7:48 a.m.