Calculate the similarity matrix based on Inter-group Differential Expression (IDER) metrics with the selected batch effects regressed out.
Usage
getIDEr(
seu,
group.by.var = "initial_cluster",
batch.by.var = "Batch",
verbose = TRUE,
use.parallel = FALSE,
n.cores = 1,
downsampling.size = 40,
downsampling.include = TRUE,
downsampling.replace = TRUE
)
Arguments
- seu
A Seurat S4 object that includes an
initial_cluster
column in itsmeta.data
. Required.- group.by.var
Character string specifying the column in
seu@meta.data
that defines initial clusters (batch-specific groups). Default is "initial_cluster".- batch.by.var
Character string specifying the metadata column that indicates batch information. Default is "Batch".
- verbose
Logical. If
TRUE
, progress messages and a progress bar are displayed. Default isTRUE
.- use.parallel
Logical. If
TRUE
, parallel computation is used (requiresdoParallel
); in this case, no progress bar will be shown. Default isFALSE
.- n.cores
Numeric. The number of cores to use for parallel computing. Default is 1.
- downsampling.size
Numeric. The number of cells representing each group. Default is 40.
- downsampling.include
Logical. Whether to include groups with fewer cells than
downsampling.size
. Default isFALSE
.- downsampling.replace
Logical. Whether to sample with replacement if a group is smaller than
downsampling.size
. Default isFALSE
.
Value
A list of objects: a similarity matrix, a numeric vector recording the cells used, and a data frame of the group combinations included.