Diff of /man/runLeiden.Rd [000000] .. [4a0329]

Switch to unified view

a b/man/runLeiden.Rd
1
% Generated by roxygen2: do not edit by hand
2
% Please edit documentation in R/scAI_model.R
3
\name{runLeiden}
4
\alias{runLeiden}
5
\title{Run Leiden clustering algorithm
6
This code is modified from Tom Kelly (https://github.com/TomKellyGenetics/leiden), where we added more parameters (seed.use and n.iter) to run the Python version. In addition, we also take care of the singleton issue after running leiden algorithm.}
7
\usage{
8
runLeiden(SNN = matrix(), resolution = 1,
9
  partition_type = c("RBConfigurationVertexPartition",
10
  "ModularityVertexPartition", "RBERVertexPartition", "CPMVertexPartition",
11
  "MutableVertexPartition", "SignificanceVertexPartition",
12
  "SurpriseVertexPartition"), seed.use = 42L, n.iter = 10L,
13
  initial.membership = NULL, weights = NULL, node.sizes = NULL)
14
}
15
\arguments{
16
\item{SNN}{An adjacency matrix compatible with \code{\link[igraph]{igraph}} object.}
17
18
\item{resolution}{A parameter controlling the coarseness of the clusters}
19
20
\item{partition_type}{Type of partition to use. Defaults to RBConfigurationVertexPartition. Options include: ModularityVertexPartition, RBERVertexPartition, CPMVertexPartition, MutableVertexPartition, SignificanceVertexPartition, SurpriseVertexPartition (see the Leiden python module documentation for more details)}
21
22
\item{seed.use}{set seed}
23
24
\item{n.iter}{number of iteration}
25
26
\item{initial.membership}{arameters to pass to the Python leidenalg function defaults initial_membership=None}
27
28
\item{weights}{defaults weights=None}
29
30
\item{node.sizes}{Parameters to pass to the Python leidenalg function}
31
}
32
\value{
33
A parition of clusters as a vector of integers
34
}
35
\description{
36
Implements the Leiden clustering algorithm in R using reticulate to run the Python version. Requires the python "leidenalg" and "igraph" modules to be installed. Returns a vector of partition indices.
37
}
38
\keyword{graph}
39
\keyword{igraph}
40
\keyword{mvtnorm}
41
\keyword{network}
42
\keyword{simulation}