SnnGraphClusterState

SnnGraphClusterState

This step does SNN graph clustering based on the neighbor search index built by NeighborIndexState. This wraps clusterSnnGraph and related functions from scran.js.

Methods not documented here are not part of the stable API and should not be used by applications.

Classes

SnnGraphClusterState

Methods

compute(run_me, parameters)

Description:
  • This method should not be called directly by users, but is instead invoked by runAnalysis.

Source:
Parameters:
Name Type Description
run_me boolean

Whether or not to run this step, depending on the clustering method chosen by the user (see ChooseClusteringState).

parameters object

Parameter object, equivalent to the snn_graph_cluster property of the parameters of runAnalysis.

Properties
Name Type Description
k number

Number of nearest neighbors used to construct the graph.

scheme string

Weighting scheme for graph construction. This can be one of "rank", "number" or "jaccard".

algorithm string

Algorithm to use for community detection. This can be one of "multilevel", "walktrap" or "leiden".

multilevel_resolution number

Resolution of the multi-level community detection.

leiden_resolution number

Resolution of the Leiden community detection.

walktrap_steps number

Number of merge steps for the Walktrap algorithm.

Returns:

The object is updated with the new results.

fetchClusters() → {Int32WasmArray}

Source:
Returns:

Array of cluster assignments for each cell in the (filtered) dataset, available after running compute.

Type
Int32WasmArray

fetchParameters() → {object}

Source:
Returns:

Object containing the parameters.

Type
object