gen.dist.matrices: Generate Distance Matrices

View source: R/gen_dist_matrices.R

gen.dist.matricesR Documentation

Generate Distance Matrices

Description

Generate distance matrices for multiple beta-diversity metrics. Returns a list of matrices.

Usage

gen.dist.matrices(
  ps,
  methods = c("all", "taxonomic", "taxonomic with Aitchison", "phylogenetic",
    "Bray-Curtis", "Canberra", "Sørensen", "Aitchison", "W Unifrac", "0.5 Unifrac",
    "U Unifrac"),
  cores = 1,
  verbose = TRUE,
  clr_ps = NULL
)

Arguments

ps

a phyloseq object.

methods

The names of the dissimilarity (or distance) indices. Defaults ("all") are all of Bray-Curtis, Canberra, Sørensen, W Unifrac, 0.5 Unifrac, and U Unifrac. Choosing "taxonomic" just runs Bray-Curtis, Canberra, and Sørensen. Choosing "phylogenetic" just runs W Unifrac, 0.5 Unifrac, and U Unifrac, which are implemented with GUniFrac. Can also supply a vector with any subset of these choices.

cores

integer indicating how many cores to run in parallel. Default 1 does not run in parallel.

verbose

TRUE/FALSE passed to any functions that can be verbose

clr_ps

required if methods that include "Aitchison" are called ("all", "taxonomic", "Aitchison")

See Also

phyloseq, capscale, vegdist, distance

Examples

data(example_phyloseq)

distance.mats <- gen.dist.matrices(example_phyloseq, methods = "taxonomic", cores = 2)

kstagaman/phyloseqCompanion documentation built on Aug. 26, 2022, 5:07 a.m.