This function performs clustering on a set of scores using either the Louvain or Markov method.

clustering(scores, threshold, cluster_method = "louvain")

Arguments

scores

A Matrix::Matrix() of (distance) scores

threshold

numerical, A threshold used to determine which genesets are considered similar. Genesets are considered similar if (distance) score <= threshold. similar.

cluster_method

character, the clustering method to use. The options are louvain and markov. Defaults to louvain.

Value

A list of clusters

Examples

## Mock example showing how the data should look like
m <- Matrix::Matrix(stats::runif(100, min = 0, max = 1), 10, 10)
rownames(m) <- colnames(m) <- c("a", "b", "c", "d", "e",
                                "f", "g", "h", "i", "j")
cluster <- clustering(m, 0.3, "markov")

## Example using the data available in the package
data(scores_macrophage_topGO_example_small,
     package = "GeDi",
     envir = environment())

clustering <- clustering(scores_macrophage_topGO_example_small,
                        threshold = 0.5)