cluster_exposure {musicatk} | R Documentation

## Perform clustering analysis from a musica result object

### Description

Proportional sample exposures will be used as input to perform clustering.

### Usage

    cluster_exposure(
      result,
      nclust,
      proportional = TRUE,
      method = "kmeans",
      dis.method = "euclidean",
      hc.method = "ward.D",
      clara.samples = 5,
      iter.max = 10,
      tol = 1e-15
    )

### Arguments

`result` | A `musica_result` object generated by a mutational discovery or prediction tool.
`nclust` | Pre-defined number of clusters.
`proportional` | Logical, indicating if proportional exposure (default) will be used for clustering.
`method` | Clustering algorithms. Options are "kmeans" (K-means), "hkmeans" (hybrid of hierarchical K-means), "hclust" (hierarchical clustering), "pam" (PAM), and "clara" (Clara).
`dis.method` | Methods to calculate dissimilarity matrix. Options are "euclidean" (default), "manhattan", "jaccard", "cosine", and "canberra".
`hc.method` | Methods to perform hierarchical clustering. Options are "ward.D" (default), "ward.D2", "single", "complete", "average", "mcquitty", "median", and "centroid".
`clara.samples` | Number of samples to be drawn from dataset. Only used when "clara" is selected. Default is 5.
`iter.max` | Maximum number of iterations for k-means clustering.
`tol` | Tolerance level for kmeans clustering level iterations

### Value

A one-column data frame with sample IDs as row names and cluster number for each sample.

### See Also

kmeans

### Examples

    set.seed(123)
    data(res_annot)
    clust_out <- cluster_exposure(res_annot, nclust = 2)

[Package musicatk version 1.2.0 Index]