View source: R/gene_clustering.R
call_walktrap_clusterset | R Documentation |
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.
call_walktrap_clusterset(
object,
steps = 4,
merges = FALSE,
modularity = FALSE,
membership = TRUE
)
object |
A 'ClusterSet' object. |
steps |
The length of the random walks to perform. |
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'.
The modified 'ClusterSet' object with updated parameters, including the Walktrap algorithm results
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.