bdiv_clusters: Cluster samples by beta diversity k-means.
Description
Cluster samples by beta diversity k-means.
Usage
bdiv_clusters(
biom,
bdiv = "Bray-Curtis",
weighted = TRUE,
normalized = TRUE,
tree = NULL,
k = 5,
...
)
Value
A numeric factor assigning samples to clusters.
Arguments
biom
An rbiom object, such as from as_rbiom().
Any value accepted by as_rbiom() can also be given here.
bdiv
Beta diversity distance algorithm(s) to use. Options are:
"Bray-Curtis", "Manhattan", "Euclidean",
"Jaccard", and "UniFrac". For "UniFrac", a
phylogenetic tree must be present in biom or explicitly
provided via tree=. Multiple/abbreviated values allowed.
Default: "Bray-Curtis"
weighted
Take relative abundances into account. When
weighted=FALSE, only presence/absence is considered.
Multiple values allowed. Default: TRUE
normalized
Only changes the "Weighted UniFrac" calculation.
Divides result by the total branch weights. Default: TRUE
tree
A phylo object representing the phylogenetic
relationships of the taxa in biom. Only required when
computing UniFrac distances. Default: biom$tree