Cluster cells using a NN-network and the Louvain algorithm. This utilizes the {community} package from python.

params

resolutionnumeric (default = 1). Clustering resolution.
weight_colcharacter (default = NULL). Weight column name.
louv_random(default = FALSE) Will randomize the node evaluation order and the community evaluation order to get different partitions at each call

Examples

g <- GiottoData::loadGiottoMini("visium")
#> 1. read Giotto object
#> 2. read Giotto feature information
#> 3. read Giotto spatial information
#> 3.1 read Giotto spatial shape information
#> 3.2 read Giotto spatial centroid information
#> 3.3 read Giotto spatial overlap information
#> 4. read Giotto image information
#> python already initialized in this session
#>  active environment : '/usr/bin/python3'
#>  python version : 3.12
clusterData(g, clusterParam("louvain_community", resolution = 0.5))
#> Error in py_run_file_impl(file, local, convert): ModuleNotFoundError: No module named 'community'
#> Run `reticulate::py_last_error()` for details.