Skip to contents

The function CalculateUMAP is used to run UMAP dimensionality reduction.

Usage

CalculateUMAP(obj, reduction = NULL, n_comp = 3, seed = 1, toList = TRUE)

# S3 method for iSCMEBObj
CalculateUMAP(obj, reduction = NULL, n_comp = 3, seed = 1, toList = TRUE)

# S3 method for iSCMEBResObj
CalculateUMAP(obj, reduction = NULL, n_comp = 3, seed = 1, toList = TRUE)

# S3 method for list
CalculateUMAP(obj, reduction = NULL, n_comp = 3, seed = 1, toList = TRUE)

Arguments

obj

A iSCMEBObj object or a iSCMEBResObj object or a list of low dimension embeddings.

reduction

The name of embeddings to be used to calculate UMAP. If reduction is null, the last added one is used for plotting.

n_comp

An optional positive integer, specify the number of features to be extracted.

seed

A random seed to be used.

toList

An indicator of whether convert the UMAP representation to a list.

Value

Returns a UMAP representation.

Returns a revised iSCMEBObj object.

Returns a revised iSCMEBResObj object.

Returns the UMAP matrix.

Examples

data(iSCMEBObj_toy)
#> Warning: data set 'iSCMEBObj_toy' not found
library(Seurat)
iSCMEBObj_toy <- CalculateUMAP(iSCMEBObj_toy, reduction="iSCMEB")
## resList <- CalculateUMAP(iSCMEBObj_toy@resList, reduction="iSCMEB")