getUMAP: Uniform Manifold Approximation and Projection(UMAP) algorithm...

View source: R/getUMAP.R

getUMAPR Documentation

Uniform Manifold Approximation and Projection(UMAP) algorithm for dimension reduction.

Description

Uniform Manifold Approximation and Projection(UMAP) algorithm for dimension reduction.

Usage

getUMAP(
  inSCE,
  useAssay = "logcounts",
  reducedDimName = "UMAP",
  n_neighbors = 5,
  n_iterations = 200,
  alpha = 1,
  metric = "euclidean",
  run_pca = TRUE
)

Arguments

inSCE

Input SCtkExperiment object. Required

useAssay

Indicate which assay to use. The default is "logcounts".

reducedDimName

a name to store the results of the dimension reduction coordinates obtained from this method. This is stored in the SingleCellExperiment object in the reducedDims slot. Required.

n_neighbors

specify the number of nearest neighbors. Default is 5.

n_iterations

number of iterations performed during layout optimization. Default is 200.

alpha

initial value of "learning rate" of layout optimization. Default is 1.

metric

distance metric. Default is euclidean, other options are 'manhattan', 'cosine', 'pearson'.

run_pca

run UMAP on PCA components? Default is TRUE.

Value

a SCtkExperiment object with the reduced dimensions updated under reducedDimName specified.

Examples

umap_res <- getUMAP(inSCE = mouseBrainSubsetSCE, useAssay = "counts",
                    reducedDimName = "UMAP", n_neighbors = 3, n_iterations = 200,
                    alpha = 1, metric = "euclidean",  run_pca = TRUE)
reducedDims(umap_res)


mmkhan19/singleCellTK documentation built on March 22, 2022, 7:43 a.m.