run_graph_based_clustering: Find clusters in SNN graph using a community detection...

View source: R/clustering.R

run_graph_based_clusteringR Documentation

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

Description

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:

  • louvain: igraph::cluster_louvain()

  • walktrap: igraph::cluster_walktrap()

  • leiden: igraph::cluster_leiden()

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.


bioinfocz/scdrake documentation built on Sept. 19, 2024, 4:43 p.m.