clusterSamples: Cluster samples

View source: R/analysisClusterSamples.R

clusterSamplesR Documentation

Cluster samples

Description

Cluster samples

Usage

clusterSamples(
  dataset = NULL,
  rank = NULL,
  dist_method = "bray",
  weighted = F,
  clust_method = "ward.D2",
  clust_num = 2,
  dataset_name = NULL
)

Arguments

dataset

MicroVis dataset. Defaults to the active dataset

rank

Rank of features to use for similarity calculation

dist_method

Method for distance calculation. One of either "bray", "euclidean", "jaccard", "unifrac", "spearman", "pearson", "kendall", "manhattan", "canberra", "clark", "kulczynski", "gower", "altGower", "morisita", "horn", "mountford", "raup", "binomial", "chao", "cao", "mahalanobis", "chisq" or "chord"

weighted

If using unifrac distance method, whether to perform weighted or unweighted unifrac. Defaults to FALSE

clust_method

Method for sample clustering. One of either "ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC). Defaults to "ward.D2"

clust_num

Number of clusters to make. Defaults to 2

dataset_name

(Not recommended) Name of the dataset to save clusters to. This should not need to be used by users since the function can determine the name of the dataset directly passed to it, but not when it is called within another function.

Value

List containing the sample adjacency matrix, metadata with an additional column assigning each sample to a cluster, and the relative abundance table (with metadata) used for adjacency calculations


microresearcher/MicroVis documentation built on Feb. 8, 2024, 10:59 a.m.