maple_viz: Plot tissue architecture labels

View source: R/maple_viz.R

maple_vizR Documentation

Plot tissue architecture labels

Description

This function allows you to plot (static or interactive) cell spot labels and uncertainty measures

Usage

maple_viz(
  fit,
  pt.size = 1,
  interactive = FALSE,
  shade_uncertainty = FALSE,
  feature = NULL
)

Arguments

fit

A list returned by fit_maple()

pt.size

The size of each cell spot point

interactive

Logical parameter controlling static or interactive nature of plot

shade_uncertainty

Logical parameter for shading of cell spots by posterior uncertainty. Must run get_maple_scores() first.

feature

A user-provided feature (e.g., gene of interest) to visualize over tissue spaces instead of sub-population labels.

Value

A ggplot object or shiny app window

Examples

## Not run: 
brain1 <- LoadData("stxBrain", type = "anterior1")
brain2 <- LoadData("stxBrain", type = "anterior2")
brain1 <- SCTransform(brain1, assay = "Spatial", verbose = FALSE)
brain2 <- SCTransform(brain2, assay = "Spatial", verbose = FALSE)
brain <- merge(brain1,brain2)
DefaultAssay(brain) <- "SCT"
VariableFeatures(brain) <- c(VariableFeatures(brain1),VariableFeatures(brain2))
brain <- RunPCA(brain)
brain_fit_PCs <- fit_maple(brain,K = 6,emb = "PCs")
maple_viz(brain_fit_PCs)

## End(Not run)

maple documentation built on March 18, 2022, 6:02 p.m.

Related to maple_viz in maple...