scran
C++ library for basic single-cell RNA-seq analyses
|
Leiden clustering on a shared nearest-neighbor graph. More...
#include <ClusterSnnGraph.hpp>
Classes | |
struct | Defaults |
Default parameter settings. More... | |
struct | Results |
Result of the igraph leiden community detection algorithm. More... | |
Public Member Functions | |
ClusterSnnGraphLeiden & | set_seed (int s=Defaults::seed) |
ClusterSnnGraphLeiden & | set_resolution (double r=Defaults::resolution) |
ClusterSnnGraphLeiden & | set_beta (double b=Defaults::beta) |
ClusterSnnGraphLeiden & | set_iterations (int i=Defaults::iterations) |
ClusterSnnGraphLeiden & | set_modularity (bool m=Defaults::modularity) |
Results | run (const BuildSnnGraph::Results &store) const |
Results | run (const igraph::Graph &graph, const igraph_real_t *weights) const |
Leiden clustering on a shared nearest-neighbor graph.
This applies Leiden clustering on a shared nearest neighbor graph. See here for more details on the Leiden algorithm.
|
inline |
s | Seed for the default igraph random number generator. |
ClusterSnnGraphLeiden
object.
|
inline |
r | Resolution of the clustering. Larger values result in more fine-grained communities. |
ClusterSnnGraphLeiden
object.
|
inline |
b | Level of randomness used during refinement. |
ClusterSnnGraphLeiden
object.
|
inline |
i | Number of iterations of the Leiden algorithm. More iterations can improve separation at the cost of computational time. |
ClusterSnnGraphLeiden
object.
|
inline |
m | Whether to optimize the modularity instead of the Constant Potts Model. |
The modularity is closely related to the Constant Potts Model, but the magnitude of the resolution is different.
ClusterSnnGraphLeiden
object.
|
inline |
Run the Leiden community detection algorithm on a shared nearest-neighbor graph constructed from knncolle::Base
object.
store | SNN graph built by BuildSnnGraph::run() . |
Results
object containing the clustering results for all cells.
|
inline |
Run the Leiden community detection algorithm on a pre-constructed shared nearest-neighbor graph as a Graph
object.
graph | An existing igraph::Graph object, typically built by BuildSnnGraph::Results::to_igraph() . |
weights | Pointer to an array of weights of length equal to the number of edges in graph . |
Results
object containing the clustering results for all cells.