embedPlot: Embedding plot for sections

Description Usage Arguments Value Examples

View source: R/visualize.R

Description

Scatter plot for sections with two-dimenstional embeddings in a SummarizedExperiment object. Each point stands for a section.

Usage

1
embedPlot(object, group = "section", method = "TSNE")

Arguments

object

A SummarizedExperiment object.

group

Character, a variable in slot meta defining the groups of sections. Sections in the same group have same colors.

method

Character, the embeddings for scatter plot. Must be one of "TSNE", "UMAP", or "PCA".

Value

A ggplot object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(zh.data)
zh <- createTomo(zh.data)
zh <- runTSNE(zh)
# Plot TSNE embeddings.
embedPlot(zh)

# Plot UMAP embeddings.
zh <- runUMAP(zh)
embedPlot(zh, method="UMAP")

# Color sections by kmeans cluster labels.
zh <- kmeansClust(zh, 3)
embedPlot(zh, group="kmeans_cluster")

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