% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mudan.R
\name{getComMembership}
\alias{getComMembership}
\title{Get clusters by community detection on approximate nearest neighbors}
\usage{
getComMembership(mat, k, method = igraph::cluster_walktrap, verbose = TRUE,
  details = FALSE)
}
\arguments{
\item{mat}{Matrix of cells as columns. Features as rows (such as PCs).}

\item{k}{K-nearest neighbor parameter.}

\item{method}{Community detection method from igraph. (default: igraph::cluster_walktrap)}

\item{verbose}{Verbosity (default: TRUE)}

\item{details}{Whether to return just community annotation or entended details including graph and graph modularity}
}
\value{
Vector of community annotations
}
\description{
Group cells into clusters based on graph-based community detection on approximate nearest neighbors
}
\examples{
{
data(pbmcA)
cd <- pbmcA[, 1:500]
mat <- cleanCounts(cd)
mat <- normalizeVariance(mat)
pcs <- getPcs(mat)
com <- getComMembership(pcs, k=30)
}

}
