Skip to contents

Find clusters in SNN graph using a community detection algorithm and if possible, using a specified resolution.

Usage

run_graph_based_clustering(
  graph_snn,
  is_integration,
  algorithm = c("louvain", "walktrap", "leiden"),
  resolution = 0.8
)

Arguments

graph_snn

(input target) An object of class igraph.

is_integration

A logical scalar: if TRUE, clusterings will be named as cluster_int_*, otherwise cluster_*.

algorithm

A character scalar: community detection algorithm:

resolution

A numeric scalar: resolution of the algorithm (not used in walktrap). Higher values result in more fine-grained clusters.

Value

A tibble whose columns are mostly self-explanatory, except the data column, which is of list type and contains an another tibble with community_detection column holding an object of class communities returned from the used igraph clustering function.