calculatePD | R Documentation |
Calculate Faith's Phylogenetic Diversity
calculatePD(x, justDF = FALSE, include_root = TRUE)
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). |
A wrapper around picante
for phyloseq
objects
to calculate and add Phylogenetic Diversity and Species Richness
to sample data.
Either a phyloseq object or data.frame with results of PD added to sample_data()
Sudarshan A. Shetty
Kembel, S.W., Cowan, P.D., et al., 2010. Picante: R tools for integrating phylogenies and ecology. Bioinformatics, 26(11), pp.1463-1464. https://doi.org/10.1093/bioinformatics/btq166
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")]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.