runTSNE {tomoda} | R Documentation

## Perform TSNE

### Description

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

### Usage

    runTSNE(object, genes = NA, matrix = "auto", perplexity = NA, ...)

### Arguments

`object` | A `SummarizedExperiment` object.
`genes` | `NA` or a vector of character. Perform TSNE 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.
`perplexity` | Numeric, perplexity parameter for Rtsne (default: 0.25 *(number of observations - 1)).
`...` | Other parameters passed to `Rtsne`.

### Value

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

### See Also

`Rtsne` for performing TSNE on a matrix.

### Examples

    data(zh.data)
    zh <- createTomo(zh.data)

    # Perform TSNE on sections.
    zh <- runTSNE(zh)

    # Perform TSNE on sections with other perplexity.
    zh <- runTSNE(zh, perplexity=10)

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

[Package tomoda version 1.0.0 Index]