runUMAP {tomoda} | R Documentation

## Perform UMAP

### Description

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

### Usage

    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

    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])

[Package tomoda version 1.0.0 Index]