binary_cut: Cluster functional terms by recursively binary cutting the...

Description Usage Arguments Value Examples

View source: R/binary_cut.R

Description

Cluster functional terms by recursively binary cutting the similarity matrix

Usage

1
2
binary_cut(mat, value_fun = median, partition_fun = partition_by_pam,
    cutoff = 0.85, cache = FALSE, try_all_partition_fun = 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.

cache

Whether the dendrogram should be cached. Internally used.

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.

Value

A vector of cluster labels (in numeric).

Examples

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

simplifyEnrichment documentation built on Nov. 8, 2020, 5:07 p.m.