cluster_signatures {MutationalPatterns} | R Documentation

## Signature clustering function

### Description

Hierarchical clustering of signatures based on cosine similarity

### Usage

    cluster_signatures(signatures, method = "complete")

### Arguments

`signatures` | Matrix with 96 trinucleotides (rows) and any number of signatures (columns)
`method` | The agglomeration method to be used for hierarchical clustering. This should be one of "ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC). Default = "complete".

### Value

hclust object

### See Also

`plot_contribution_heatmap`

### Examples

    ## Get signatures
    signatures <- get_known_signatures()

    ## See the 'mut_matrix()' example for how we obtained the mutation matrix:
    mut_mat <- readRDS(system.file("states/mut_mat_data.rds",
      package = "MutationalPatterns"
    ))

    ## Hierarchically cluster the cancer signatures based on cosine similarity
    hclust_signatures <- cluster_signatures(signatures)

    ## Plot dendrogram
    plot(hclust_signatures)

[Package MutationalPatterns version 3.0.1 Index]