scran
C++ library for basic single-cell RNA-seq analyses
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
scran::ClusterSnnGraphWalktrap Class Reference

Walktrap clustering on a shared nearest-neighbor graph. More...

#include <ClusterSnnGraph.hpp>

Classes

struct  Defaults
 Default parameter settings. More...
 
struct  Results
 Result of the igraph Walktrap community detection algorithm. More...
 

Public Member Functions

ClusterSnnGraphWalktrapset_steps (int s=Defaults::steps)
 
Results run (const BuildSnnGraph::Results &store) const
 
Results run (const igraph::Graph &graph, const igraph_real_t *weights) const
 

Detailed Description

Walktrap clustering on a shared nearest-neighbor graph.

This applies Walktrap clustering on a shared nearest neighbor graph. See here for more details on the Walktrap algorithm.

Member Function Documentation

◆ set_steps()

ClusterSnnGraphWalktrap & scran::ClusterSnnGraphWalktrap::set_steps ( int  s = Defaults::steps)
inline
Parameters
sNumber of steps of the random walk.
Returns
A reference to this ClusterSnnGraphWalktrap object.

◆ run() [1/2]

Results scran::ClusterSnnGraphWalktrap::run ( const BuildSnnGraph::Results store) const
inline

Run the Walktrap community detection algorithm on a shared nearest-neighbor graph constructed from knncolle::Base object.

Parameters
storeSNN graph built by BuildSnnGraph::run().
Returns
A Results object containing the clustering results for all cells.

◆ run() [2/2]

Results scran::ClusterSnnGraphWalktrap::run ( const igraph::Graph graph,
const igraph_real_t *  weights 
) const
inline

Run the Walktrap community detection algorithm on a pre-constructed shared nearest-neighbor graph as a Graph object.

Parameters
graphAn existing igraph::Graph object, typically built by BuildSnnGraph::Results::to_igraph().
weightsPointer to an array of weights of length equal to the number of edges in graph.
Returns
A Results object containing the clustering results for all cells.

The documentation for this class was generated from the following file: