binary_cut {simplifyEnrichment} | R Documentation

## Cluster functional terms by recursively binary cutting the similarity matrix

### Description

Cluster functional terms by recursively binary cutting the similarity matrix

### Usage

    binary_cut(mat, value_fun = median, partition_fun = partition_by_pam,
        cutoff = 0.85, try_all_partition_fun = FALSE, partial = FALSE)

### Arguments

`mat` | A similarity matrix.
`value_fun` | Value function to calculate the score for each node in the dendrogram.
`partition_fun` | A function to split each node into two groups. Pre-defined functions in this package are `partition_by_kmeanspp`, `partition_by_pam` and `partition_by_hclust`.
`cutoff` | The cutoff for splitting the dendrogram.
`try_all_partition_fun` | Different `partition_fun` gives different clusterings. If the vaule of `try_all_partition_fun` is set to `TRUE`, the similarity matrix is clustered by three partitioning method: `partition_by_pam`, `partition_by_kmeanspp` and `partition_by_hclust`. The clustering with the highest difference score is finally selected as the final clustering.
`partial` | Whether to generate the complete clustering or the clustering stops when sub-matrices cannot be split anymore.

### Value

A vector of cluster labels (in numeric).

### Examples

    mat = readRDS(system.file("extdata", "random_GO_BP_sim_mat.rds",
        package = "simplifyEnrichment"))
    binary_cut(mat)

[Package simplifyEnrichment version 1.4.0 Index]