runUMAP: Perform UMAP

Description Usage Arguments Value See Also Examples

View source: R/process.R

Description

Perform UMAP on sections or genes in a SummarizedExperiment object for dimensionality reduction.

Usage

1
runUMAP(object, genes = NA, matrix = "auto", ...)

Arguments

object

A SummarizedExperiment object.

genes

NA or a vector of character. Perform UMAP on sections if it is NA, or on given genes if it is a vector of gene names.

matrix

Character, must be one of "auto", "count", "normalized", or "scaled". If "auto", normalized matrix is used for sections and scaled matrix is used for genes.

...

Other parameters passed to umap.

Value

A SummarizedExperiment object. The UMAP embeddings are saved in slot meta if UMAP is performed on sections, or saved in slot gene_embedding if UMAP is performed on genes.

See Also

umap for performing UMAP on a matrix.

Examples

1
2
3
4
5
6
7
8
data(zh.data)
zh <- createTomo(zh.data)

# Perform UMAP on sections.
zh <- runUMAP(zh)

# Perform UMAP on some genes.
zh <- runUMAP(zh, genes=rownames(zh)[1:100])

tomoda documentation built on Nov. 8, 2020, 8:10 p.m.