sc_clustering.seurat: Perform Single Cell data clustering using Seurat

View source: R/sc_clustering_methods.R

sc_clustering.seuratR Documentation

Perform Single Cell data clustering using Seurat

Description

Perform Single Cell data clustering using Seurat

Usage

sc_clustering.seurat(
  counts,
  resolutions,
  metadata = NULL,
  min.cells = 0,
  min.features = 0,
  scale.factor = 10000,
  vars.to.regress = NULL,
  find.variable.features = T,
  npcs = 40,
  seurat.graph.algorithm = 1,
  build.hierarchical.tree = FALSE,
  return.seurat.object = FALSE,
  verbose = FALSE
)

Arguments

counts

n.genes-by-n.cells count matrix

resolutions

vector of clustering resolution paramers (input for FindClusters)

metadata

a data frame containing all the cell informations (equivalent to colData)

min.cells

integer, include features detected in at least this number cells

min.features

integer, include cells where at least this number features are detected

scale.factor

scalar, sets the scale factor for cell-level normalization

vars.to.regress

a vector of strings, variables to regress out

find.variable.features

T: find highly variable features using 'mean.var.plot', if >1: find variable features using 'vst' to get find.variable.features genes. F: not genes selection is performed

npcs

integer, number of principal component to calculate. The PCS are used for build neighbor graph

seurat.graph.algorithm

algorithm for modularity optimization (1 = original Louvain algorithm; 2 = Louvain algorithm with multilevel refinement; 3 = SLM algorithm; 4 = Leiden algorithm). Leiden requires the leidenalg python.

build.hierarchical.tree

boolean, whether to build hierarchical tree using HAC from Seurat clusters with max(resolution).

return.seurat.object

boolean, whether to return Seurat object. Save memory by setting it to FALSE.

verbose

boolean, whether to print messages

Value

a list containing

seurat.clusters

a data frame containing all clusteringS as columns with prefix 'RNA_snn_res.'

obj

Seurat object before clustering is performed

hc.tree

hclust object resulted from hierarchical agglomerative clustering using Seurat clusters from max(resolutions)


pengminshi/MRtree documentation built on March 6, 2023, 4:20 p.m.