calculatePD: Calculate Faith's Phylogenetic Diversity

View source: R/calculatePD.R

calculatePDR Documentation

Calculate Faith's Phylogenetic Diversity

Description

Calculate Faith's Phylogenetic Diversity

Usage

calculatePD(x, justDF = FALSE, include_root = TRUE)

Arguments

x

A phyloseq object

justDF

Logical if TURE returns only sample data as tibble with PD and SR values as columns.Default is FALSE

include_root

Logical if root node be included. Depends whether the input phyloseq had rooted tree (default = TRUE).

Details

A wrapper around picante for phyloseq objects to calculate and add Phylogenetic Diversity and Species Richness to sample data.

Value

Either a phyloseq object or data.frame with results of PD added to sample_data()

Author(s)

Sudarshan A. Shetty

References

Examples

library(biomeUtils)
data("FuentesIliGutData")
# reduce size for example
ps1 <- subset_samples(FuentesIliGutData, ILI == "C")
ps1 <- prune_taxa(taxa_sums(ps1) > 0, ps1)

meta_tib <- calculatePD(ps1, justDF = TRUE)
# check
meta_tib[c(1, 2, 3), c("PD", "SR")]

RIVM-IIV-Microbiome/biomeUtils documentation built on July 20, 2023, 10:29 a.m.