call_walktrap_clusterset: Perform Community Detection Using the Walktrap Algorithm...

View source: R/gene_clustering.R

call_walktrap_clustersetR Documentation

Perform Community Detection Using the Walktrap Algorithm (internal function)

Description

Applies the Walktrap 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_walktrap_clusterset(
  object,
  steps = 4,
  merges = FALSE,
  modularity = FALSE,
  membership = TRUE
)

Arguments

object

A 'ClusterSet' object.

steps

The length of the random walks to perform.

Details

This function reads a graph from the input file defined in the 'ClusterSet' object, processes the graph using the Walktrap 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="walktrap")


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