Skip to contents

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

Usage

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

Arguments

musica

A musica object containing a mutational discovery or prediction.

model_name

The name of the desired model.

modality

The modality of the model. Must be "SBS96", "DBS78", or "IND83". Default "SBS96".

result_name

Name of the result list entry containing desired model. Default "result".

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

Examples

set.seed(123)
data(res_annot)
clust_out <- cluster_exposure(res_annot, model_name = "res_annot",
nclust = 2)
#> Metric: 'euclidean'; comparing: 7 vectors.
#> Warning: FANNY algorithm has not converged in 'maxit' = 10 iterations