call_louvain_clusterset: Perform Community Detection Using the Louvain Algorithm...

View source: R/gene_clustering.R

call_louvain_clustersetR Documentation

Perform Community Detection Using the Louvain Algorithm (internal function)

Description

Applies the Louvain algorithm for community detection on a graph derived from the input data in a 'ClusterSet' object. Outputs the resulting clusters to a specified file and updates the parameters in the 'ClusterSet' object.

Usage

call_louvain_clusterset(object, resolution = 1)

Arguments

object

A 'ClusterSet' object.

resolution

The level of resolution.

Details

This function reads a graph from the input file defined in the 'ClusterSet' object, processes the graph using the Louvain community detection algorithm from the 'igraph' package, and return the clusters enclose in the 'ClusterSet'.

Value

The modified 'ClusterSet' object with updated parameters, including the Walktrap algorithm results

Examples

# Restrict vebosity to info messages only.
set_verbosity(1)
# Load a dataset
load_example_dataset("7871581/files/pbmc3k_medium")
# Select informative genes
res <- select_genes(pbmc3k_medium,
                    distance = "pearson",
                    row_sum=5)

# Cluster informative features
res <- gene_clustering(res, method="closest_neighborhood",
                       algorithm="louvain")


dputhier/dbfmcl documentation built on Dec. 20, 2024, 1:59 a.m.