embedPlot: Embedding plot for sections

View source: R/visualize.R

embedPlotR Documentation

Embedding plot for sections

Description

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

Usage

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

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

liuwd15/tomoda documentation built on March 29, 2022, 1:09 a.m.