Skip to contents

Returns the shared nearest neighbour graph from the object. This function is used for the single cell-related classes and methods.

Usage

get_snn_graph(x, ...)

## S7 method for class <bixverse::MetaCells>
get_snn_graph(x, ...)

# S3 method for class 'ScCache'
get_snn_graph(x, ...)

## S7 method for class <bixverse::SingleCells>
get_snn_graph(x, ...)

## S7 method for class <bixverse::SingleCellsSubset>
get_snn_graph(x, ...)

Arguments

x

An object to get the sNN graph from.

...

Other parameters.

Value

The igraph that has the shared nearest neighbours.

Examples

# the sNN graph the clustering methods run on
sc <- demo_single_cells()
igraph::vcount(get_snn_graph(sc))
#> [1] 500

unlink(sc@dir_data, recursive = TRUE, force = TRUE)