scOverlay creates layered visualizations of single-cell data stored in
SingleCellExperiment objects. It is designed to show one layer of information
as context, such as clusters, samples or gene expression, while overlaying a
second layer of information on top of it.
The package is especially useful to highlight subsets of cells, gene expression, metadata annotations or quality-control scores while preserving the global structure of a t-SNE, UMAP or other reduced-dimension representation.
scOverlay is a Bioconductor package (in process). Once available from Bioconductor, it
can be installed with:
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("scOverlay")
The development version can be installed from GitHub with:
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}
remotes::install_github("bernatgel/scOverlay")
library(scOverlay)
data("sce_overlay_example")
plotOverlay(
sce = sce_overlay_example,
foreground = "CDH19",
background = "cluster",
reduced_dim = "TSNE"
)
background and foreground can be a gene, a cell annotation
from colData(sce), "solid" or "none".
plotOverlay(
sce = sce_overlay_example,
foreground = "scDblFinder.score",
background = "cluster",
fg_subset_cells = quote(cluster == "1"),
fg_palette = "red",
reduced_dim = "TSNE"
)
Grouped plots can be created with plotOverlayPerGroup():
plotOverlayPerGroup(
sce = sce_overlay_example,
group_col = "sample_type",
foreground = "PRRX1",
background = "cluster",
reduced_dim = "TSNE",
fg_limits = "shared",
shared_legend = TRUE
)
The package vignette provides a more complete introduction to the layered plotting model, palettes, foreground subsetting, grouped plots, rasterization and saving figures.
Bioconductor links will become active once the package is available from Bioconductor.
ggplot2 output objects that can be further customized.If you use scOverlay in published work, please cite it with:
citation("scOverlay")
A formal citation will be added once available.
scOverlay is distributed under the Artistic-2.0 license.
Please use the GitHub issue tracker to report bugs or request features: