RunDM: Run DM (diffusion map)

View source: R/Seurat-function.R

RunDMR Documentation

Run DM (diffusion map)

Description

Run DM (diffusion map)

Usage

RunDM(object, ...)

## S3 method for class 'Seurat'
RunDM(
  object,
  reduction = "pca",
  dims = 1:30,
  features = NULL,
  assay = NULL,
  slot = "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,
  slot = "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 the DiffusionMap function.

reduction

A character string specifying the reduction to be used.

dims

An integer vector specifying the dimensions to be used. Default is 1:30.

features

A character vector specifying the features to be used. Default is NULL.

assay

A character string specifying the assay to be used. Default is NULL.

slot

A character string specifying the slot name to be used. Default is "data".

ndcs

An integer specifying the number of diffusion components (dimensions) to be computed. Default is 2.

sigma

A character string specifying the diffusion scale parameter of the Gaussian kernel. Currently supported values are "local" (default) and "global".

k

An integer specifying the number of nearest neighbors to be used for the construction of the graph. Default is 30.

dist.method

A character string specifying 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

A character string specifying the name of the reduction to be stored in the Seurat object. Default is "dm".

reduction.key

A character string specifying the prefix for the column names of the basis vectors. Default is "DM_".

verbose

A logical value indicating whether to print verbose output. Default is TRUE.

seed.use

An integer specifying the random seed to be used. Default is 11.

Examples

pancreas_sub <- Seurat::FindVariableFeatures(pancreas_sub)
pancreas_sub <- RunDM(object = pancreas_sub, features = Seurat::VariableFeatures(pancreas_sub))
CellDimPlot(pancreas_sub, group.by = "CellType", reduction = "dm")


zh542370159/SCP documentation built on Nov. 22, 2023, 2:34 a.m.