plotUMAP: plotUMAP

Description Usage Arguments Value Examples

View source: R/ascend_plots.R

Description

Generates a 2D UMAP plot using a TSNE matrix generated by the runUMAP function.

Usage

1
plotUMAP(object, Dim1 = 1, Dim2 = 2, group = NULL, density = FALSE)

Arguments

object

An EMSet object that hasv values calculated by UMAP in the reducedDim slot.

Dim1

Dimension to plot on the x-axis.

Dim2

Dimension to plot on the y-axis.

group

(Optional) Name of the column in colInfo that describe a set of conditions you would like to colour cells by.

density

Vary alpha by density (Default: FALSE)

Value

A ggplot glob that contains a scatter plot.

Examples

1
2
3
4
5
6
# Load pre-processed data
em_set <- ascend::analyzed_set

# Plot with t-SNE 
umap_plot <- plotUMAP(em_set, Dim1 = 1, Dim2 = 2, 
group = "cluster", density = FALSE)

IMB-Computational-Genomics-Lab/ascend documentation built on Aug. 29, 2019, 4:10 a.m.