This function performs clustering on a set of scores using either the Louvain or Markov method.
clustering(scores, threshold, cluster_method = "louvain")
A Matrix::Matrix()
of (distance) scores
numerical, A threshold used to determine which genesets are considered similar. Genesets are considered similar if (distance) score <= threshold. similar.
character, the clustering method to use. The options
are louvain
and markov
. Defaults to louvain
.
A list
of clusters
## 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)