plotUmap: plotUmap

View source: R/plotUmap.R

plotUmapR Documentation

plotUmap

Description

Plots UMAP embedding stored in reducedDim slot.

Usage

plotUmap(scCNA, embedding = "umap", label = NULL)

Arguments

scCNA

The CopyKit object.

embedding

String with the name of the reducedDim to pull data from.

label

A string with the elements from colData to color the umap points.

Details

A reduced dimension representation with UMAP in the slot reducedDim from the scCNA object.

Columns from colData can be used as an argument for 'label' to color the points on the plot.

Value

A ggplot object containing the reduced dimensions UMAP plot.

Author(s)

Darlan Conterno Minussi

Examples

set.seed(1000)
copykit_obj <- copykit_example_filtered()[,sample(300)]
copykit_obj <- runUmap(copykit_obj)

plotUmap(copykit_obj)

copykit_obj <- findClusters(copykit_obj)

plotUmap(copykit_obj, label = "subclones")

colData(copykit_obj)$section <- stringr::str_extract(
    colData(copykit_obj)$sample,
    "(L[0-9]+L[0-9]+|L[0-9]+)"
)

plotUmap(copykit_obj, label = c("section"))

navinlabcode/copykit documentation built on Oct. 16, 2024, 2:55 p.m.