Perform batch-specific initial clustering on a Seurat object.
Usage
initialClustering(
seu,
batch.var = "Batch",
cut.height = 0.4,
nfeatures = 2000,
additional.vars.to.regress = NULL,
dims = seq_len(14),
resolution = 0.6,
downsampling.size = 50,
verbose = FALSE
)
Arguments
- seu
A Seurat object. Required.
- batch.var
Character string specifying one of the column names in
seu@meta.data
used to partition the object into subsets. Default is "Batch".- cut.height
Numeric value specifying the height at which to cut hierarchical trees. Default is 0.4.
- nfeatures
Numeric value indicating the number of high-variance genes to use. Default is 2000.
- additional.vars.to.regress
Character vector of additional variable names from
seu@meta.data
to regress out. Optional. Default isNULL
.- dims
Numeric vector specifying the dimensions to be used for clustering (passed to Seurat). Default is 1:14.
- resolution
Numeric value for clustering resolution (passed to Seurat). Default is 0.6.
- downsampling.size
Numeric value indicating the number of cells representing each group. Default is 40.
- verbose
Logical. If
TRUE
, a progress bar is displayed. Default isFALSE
.
Value
A Seurat S4 object with initial cluster assignments stored in the initial_cluster
column of its meta.data
.