phyloseq_phylo_ses: Estimate standardized effect sizes (SES) of phylogenetic...

View source: R/phyloseq_phylo_ses.R

phyloseq_phylo_sesR Documentation

Estimate standardized effect sizes (SES) of phylogenetic diversity metrics (PD, MPD, MNTD, VPD) using randomization-based approach.

Description

This function utilizes randomization-based approach to computet SES values (in contrast to the exact standardisation approach used in phyloseq_phylo_div with 'standardize' option), which could be more computation intensive. Note that despite more freedom in defining the null-model with randomization-based approach it is debatable that this method can provide a reasonable approximation by selecting only a limited number of possible combinations (especially for large phylogenetic trees).

Currently only non-abundance-weighted estimates are implemented.

Usage

phyloseq_phylo_ses(
  physeq,
  measures = c("PD", "MPD", "MNTD", "VPD"),
  null_model = "taxa.labels",
  package = "picante",
  abundance_weighted = FALSE,
  nsim = 1000,
  swapiter = 1000,
  verbose = TRUE,
  ...
)

Arguments

physeq

A phyloseq-class object (phylogenetic tree is required)

measures

Character vector with diversity indices names ("PD", "MPD", "MNTD", "VPD")

null_model

Character string indicating which null model to use (for the supported list of models see ses.pd)

package

Which package to use for diversity estimation - "picante" (default) or "PhyloMeasures" (could be faster)

abundance_weighted

Logical; should diversity metrics be weighted by species abundance? (default = FALSE)

nsim

Number of randomizations for null-distribution generation

swapiter

Number of iterations for independentswap or trialswap algorithms

verbose

Logical; if TRUE, progress messages from the function will be printed

...

Additional arguments currently are not implemented

Details

Available metrics include:

  • PD - Faith's phylogenetic diversity (total length of all the phylogenetic branches for a given set of taxa);

  • MPD - Mean pairwise distance between the tips from a phylogenetic tree;

  • MNTD - Mean nearest taxon distance;

  • VPD - Variance of the pairwise distances.

Values of SES above zero indicate that the species pool of a habitat is more diverse than the regional species pool.

Value

Data frame.

References

Webb C., Ackerly D., McPeek M., Donoghue M. (2002) Phylogenies and community ecology. Annual Review of Ecology and Systematics, 33, 475-505.

See Also

phyloseq_phylo_div, phyloseq_randomize, randomizeMatrix, ses.pd, ses.mpd, ses.mntd, pd.query, mpd.query, mntd.query

Examples

# Load data
data(esophagus)

# Estimate phylogenetic diversity index (PDI)
phyloseq_phylo_ses(esophagus, measures = "PD", null_model = "taxa.labels", nsim = 100, verbose = F)

# Estimate phylogenetic diversity, mean pairwise distance,
# mean nearest taxon distance and variance of phylogenetic distances;
# use independent swap algorithm to generate the null distribution
phyloseq_phylo_ses(esophagus,
                   measures = c("PD", "MPD", "MNTD", "VPD"),
                   null_model = "independentswap",
                   nsim = 200, swapiter = 200)  # NB. increase the number of iterations!


vmikk/metagMisc documentation built on Feb. 14, 2024, 2:29 a.m.