find_communities: Community detection

View source: R/find_communities.R

find_communitiesR Documentation

Community detection

Description

Build a KNN graph and run Louvain algorithm for community detection.

Usage

find_communities(
  pca_o,
  nb_pcs = 10,
  k = 100,
  gamma = 1,
  nreps = 1,
  nb_cores = 1
)

Arguments

pca_o

the output of run_pca

nb_pcs

the number of PCs to use. Default 10.

k

the number of nearest neighbor for the KNN graph. Default 100.

gamma

a vector of gamma. Default 1.

nreps

the number of repetition for each gamma, Default 1.

nb_cores

the number of processors to use. Default is 1.

Value

a list with:

comm

a data.frame with two columns: 'cell' and 'community'.

comm.all

a matrix with communities for each gamma

gamma

the list of input gamma corresponding to each comm.all column.

best.gamma

the gamma resulting on the highest ARI mean

ari.df

data.frame with ARI stats for each gamma

Author(s)

Jean Monlong


jmonlong/scCNAutils documentation built on May 3, 2022, 4:34 a.m.