getApproxComMembership: Get clusters by community detection on approximate nearest...

Description Usage Arguments Value Examples

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

Usage

1
2
3
getApproxComMembership(mat, k, nsubsample = ncol(mat) * 0.5,
  method = igraph::cluster_walktrap, seed = 0, vote = FALSE,
  verbose = TRUE)

Arguments

mat

Matrix of cells as columns. Features as rows (such as PCs).

k

K-nearest neighbor parameter.

nsubsample

Number of cells in subset (default: ncol(mat)*0.5)

method

Community detection method from igraph. (default: igraph::cluster_walktrap)

seed

Random seed for reproducibility

vote

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

verbose

Verbosity (default: TRUE)

Value

Vector of community annotations

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
data(pbmcA)
cd <- pbmcA
mat <- cleanCounts(cd)
mat <- normalizeVariance(mat)
pcs <- getPcs(mat)
com <- getApproxComMembership(pcs, k=30, getApproxComMembership=1000)

## End(Not run)

JEFworks/MUDAN documentation built on June 19, 2021, 6:46 a.m.