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

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

\item{nsubsample}{Number of cells in subset (default: ncol(mat)*0.5)}

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

\item{seed}{Random seed for reproducibility}

\item{vote}{Use neighbor voting system to annotate rest of cells not in subset. If false, will use machine-learning model. (default: FALSE)}

\item{verbose}{Verbosity (default: TRUE)}
}
\value{
Vector of community annotations
}
\description{
Group cells into clusters based on graph-based community detection on approximate nearest neighbors for random subset of cells
For when getComMembership takes too long due to there being too many cells
}
\examples{
\dontrun{
data(pbmcA)
cd <- pbmcA
mat <- cleanCounts(cd)
mat <- normalizeVariance(mat)
pcs <- getPcs(mat)
com <- getApproxComMembership(pcs, k=30, getApproxComMembership=1000)
}

}
