runTSNE: Perform TSNE

Description Usage Arguments Value See Also Examples

View source: R/process.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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])

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