View source: R/ridgeEnrichment.R
ridgeEnrichment | R Documentation |
This function allows to the user to examine the distribution of enrichment across groups by generating a ridge plot.
ridgeEnrichment(
input.data,
gene.set.use,
assay = NULL,
group.by = NULL,
color.by = "group",
order.by = NULL,
scale = FALSE,
facet.by = NULL,
add.rug = FALSE,
palette = "inferno"
)
input.data |
Output of |
gene.set.use |
Character(1). Name of the gene set to display. |
assay |
Name of the assay holding enrichment scores when 'input.data' is a single‑cell object. Ignored otherwise. |
group.by |
Metadata column plotted on the *y*‑axis. Defaults to the Seurat/SCE 'ident' slot when 'NULL'. |
color.by |
Aesthetic mapped to point color. Use either *"group"* (default = 'group.by') for categorical coloring or the *name of a gene‑set* (e.g. same as 'gene.set') to obtain a numeric accepted. |
order.by |
How to arrange the x‑axis: *'"mean"'* – groups ordered by decreasing group mean; *'"group"'* – natural sort of group labels; *'NULL'* – keep original ordering. |
scale |
Logical; if 'TRUE' scores are centred/scaled (Z‑score) prior to plotting. |
facet.by |
Optional metadata column used to facet the plot. |
add.rug |
Logical. Draw per-cell tick marks underneath each ridge. |
palette |
Character. Any palette from |
A [ggplot2] object.
gs <- list(Bcells = c("MS4A1", "CD79B", "CD79A", "IGH1", "IGH2"),
Tcells = c("CD3E", "CD3D", "CD3G", "CD7","CD8A"))
pbmc <- SeuratObject::pbmc_small |>
runEscape(gene.sets = gs, min.size = NULL)
ridgeEnrichment(pbmc, assay = "escape",
gene.set.use = "Tcells",
group.by = "groups")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.