revolver_cluster: Compute hierarchical clustering for a REVOLVER cohort.

View source: R/revolver_cluster.R

revolver_clusterR Documentation

Compute hierarchical clustering for a REVOLVER cohort.

Description

Compute hierarchical clustering for a REVOLVER cohort with fit models. To compute clusters first a pairwise distance is computed between the patients, then the cluster package is used to compute a dendrogram of the patients, and is split using the heuristic dendrogram-cutting functions available in the dynamicTreeCut package. This function accepts parameters that are forwarded to the functions to carry out this task.

Results are stored inside the field cluster of the returned object.

Usage

revolver_cluster(
  x,
  patients = x$patients,
  hc.method = "ward",
  split.method = "cutreeHybrid",
  min.group.size = 2
)

Arguments

x

A "rev_cohort_fit" object for which the evolutionary distance has been computed.

hc.method

Method for hierarchial clustering, anything that can be passed to the agnes function of the cluster package.

split.method

Method to cut the dendrogram, anything of cutreeDynamic, cutreeDynamicTree or cutreeHybrid which are available in the dynamicTreeCut package, or static to use the find_k function from the dendextend package.

min.group.size

Minimum group size for dynamicTreeCut functions.

Value

The input x with a modified field cluster that stores all relevant clustering results.

See Also

Other Analysis functions: revolver_fit()

Examples

data(CRC.cohort)
fit = revolver_fit(CRC.cohort)
fit = revolver_evo_distance(fit)
fit = revolver_cluster(fit) # dumped also to disk

caravagn/revolver documentation built on May 21, 2022, 5:48 p.m.