phy_alpha_div_into_phy_metadata: Add alpha diversities into phyloseq metadata

View source: R/phy_alpha_div_into_phy_metadata.R

phy_alpha_div_into_phy_metadataR Documentation

Add alpha diversities into phyloseq metadata

Description

This function takes a phyloseq object, passes it throuh the 'estimate_richness' function in 'phyloseq' and returns the phyloseq object containing alpha diversity estimates as "alpha_[diversity_name]"

Usage

phy_alpha_div_into_phy_metadata(
  physeq,
  raref_depth = NULL,
  measures,
  verbose = FALSE
)

Arguments

physeq

a 'phyloseq' object

raref_depth

the number of minimum reads to rarefy by

measures

the alpha diversity measures, as implemented by the 'phyloseq::estimate_richness' function

verbose

if 'TRUE', will tell you what it is doing, in particular in the rarefaction step

Value

a 'phyloseq' object with the alpha diversity estimates added to the metadata

Examples


data(GlobalPatterns)
phy_alpha_div_into_phy_metadata(GlobalPatterns,
     raref_depth = 5000,
     measures = c("Shannon", "Simpson"),
     verbose = TRUE)


g-antonello/gautils2 documentation built on Nov. 28, 2022, 9:39 a.m.