Learn R Programming

coFAST (version 0.2.0)

AddCluster: Find clusters for SRT data

Description

Identify clusters of spots by a shared nearest neighbor (SNN) modularity optimization based on coFAST's embeddings.

Usage

AddCluster(
  seu,
  reduction = "cofast",
  cluster.name = "cofast.cluster",
  res = 0.8,
  K = NULL,
  res.start = 0.2,
  res.end = 2,
  step = 0.02
)

Value

return a revised Seurat object with a new column in meta.data named cluster.name.

Arguments

seu

a Seurat object.

reduction

a optional string, dimensional reduction name, `cofast` by default.

cluster.name

an optional string, specify the colname in meta.data for clusters, `cofast.cluster` by default.

res

a positive real, speficy the resolution parameter for Louvain clustering, default as 0.8.

K

a positive integer or NULL, specify the number of clusters, default as NULL that indicates not specify the number of clusters.

res.start

a positive real, when K is not NULL, starting value of resolution to be searched, default as 0.2.

res.end

a positive real, when K is not NULL, ending value of resolution to be searched, default as 2.

step

a positive real, when K is not NULL, step size of resolution to be searched, default as 0.02.

Details

None

References

None

See Also

None

Examples

Run this code
library(Seurat)
data(pbmc3k_subset)
pbmc3k_subset <- AddCluster(pbmc3k_subset, reduction='ncfm')
head(pbmc3k_subset)

Run the code above in your browser using DataLab