Run DM (diffusion map)
Usage
RunDM(object, ...)
# S3 method for class 'Seurat'
RunDM(
object,
reduction = "pca",
dims = 1:30,
features = NULL,
assay = NULL,
layer = "data",
ndcs = 2,
sigma = "local",
k = 30,
dist.method = "euclidean",
reduction.name = "dm",
reduction.key = "DM_",
verbose = TRUE,
seed.use = 11,
...
)
# Default S3 method
RunDM(
object,
assay = NULL,
layer = "data",
ndcs = 2,
sigma = "local",
k = 30,
dist.method = "euclidean",
reduction.key = "DM_",
verbose = TRUE,
seed.use = 11,
...
)
Arguments
- object
An object. This can be a Seurat object or a matrix-like object.
- ...
Additional arguments to be passed to destiny::DiffusionMap.
- reduction
The reduction to be used. Default is
"pca"
.- dims
The dimensions to be used. Default is
1:30
.- features
The features to be used. Default is
NULL
.- assay
The assay to be used. Default is
NULL
.- layer
The layer to be used. Default is
"data"
.- ndcs
A number of diffusion components (dimensions) to be computed. Default is
2
.- sigma
The diffusion scale parameter of the Gaussian kernel. Currently supported values are
"local"
(default) and"global"
.- k
A number of nearest neighbors to be used for the construction of the graph. Default is
30
.- dist.method
The distance metric to be used for the construction of the knn graph. Currently supported values are
"euclidean"
and"cosine"
. Default is"euclidean"
.- reduction.name
The name of the reduction to be stored in the Seurat object. Default is
"dm"
.- reduction.key
The prefix for the column names of the basis vectors. Default is
"DM_"
.- verbose
Whether to print the message. Default is
TRUE
.- seed.use
An integer specifying the random seed to be used. Default is
11
.
Examples
pancreas_sub <- Seurat::FindVariableFeatures(pancreas_sub)
#> Finding variable features for layer counts
pancreas_sub <- RunDM(
object = pancreas_sub,
features = SeuratObject::VariableFeatures(pancreas_sub)
)
#> Warning: Layer ‘data’ is empty
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 't': subscript out of bounds
CellDimPlot(
pancreas_sub,
group.by = "CellType",
reduction = "dm"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.