plotAlluvial: plotAlluvial()

View source: R/plotAlluvial.R

plotAlluvialR Documentation

plotAlluvial()

Description

Produces an alluvial plot from character elements of the metadata

Usage

plotAlluvial(scCNA, label, label_colors = NULL, min_cells = NULL)

Arguments

scCNA

The CopyKit object.

label

A string with two or more elements from colData.

label_colors

An optional named vector with the colors of each element from label.

min_cells

An optional numeric to filter stratum that do not reach the minimum amount of cells.

Value

A ggplot object containing an alluvial plot from ggalluvial

Examples

copykit_obj <- copykit_example_filtered()
copykit_obj <- findClusters(copykit_obj)
colData(copykit_obj)$section <- stringr::str_extract(
    colData(copykit_obj)$sample,
    "(L[0-9]+L[0-9]+|L[0-9]+)"
)
plotAlluvial(copykit_obj, label = c("subclones", "section"))

navinlabcode/copykit documentation built on Sept. 22, 2023, 9:16 a.m.