calculateCommunitiesStats: Generate graph communities and their summarizing statistics

View source: R/network.R

calculateCommunitiesStatsR Documentation

Generate graph communities and their summarizing statistics

Description

This function generates the TF-gene graph from the filtered GRN object, and clusters its vertices into communities using established community detection algorithms.

Usage

calculateCommunitiesStats(GRN, clustering = "louvain", forceRerun = FALSE, ...)

Arguments

GRN

Object of class GRN

clustering

Character. Default louvain. One of: louvain, leiden, leading_eigen, fast_greedy, optimal, walktrap. The community detection algorithm to be used. Please bear in mind the robustness and time consumption of the algorithms when opting for an alternative to the default.

forceRerun

TRUE or FALSE. Default FALSE. Force execution, even if the GRN object already contains the result. Overwrites the old results.

...

Additional parameters for the used clustering method, see the igraph::cluster_* methods for details on the specific parameters and what they do. For leiden clustering, for example, you may add a resolution_parameter to control the granularity of the community detection or n_iterations to modify the number of iterations.

Value

The same GRN object, with a table that consists of the connections clustered into communities stored in the stats$communities slot.

Examples

# See the Workflow vignette on the GRaNIE website for examples
GRN = loadExampleObject()
GRN = calculateCommunitiesStats(GRN, forceRerun = FALSE)

chrarnold/GRaNIE documentation built on April 28, 2022, 2:18 a.m.