View source: R/geyserEnrichment.R
geyserEnrichment | R Documentation |
This function allows to the user to examine the distribution of enrichment across groups by generating a geyser plot.
geyserEnrichment(
input.data,
assay = NULL,
group.by = NULL,
gene.set,
color.by = "group",
order.by = NULL,
scale = FALSE,
facet.by = NULL,
summarise.by = NULL,
summary.stat = "mean",
palette = "inferno"
)
input.data |
Output of |
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 *x*‑axis. Defaults to the Seurat/SCE 'ident' slot when 'NULL'. |
gene.set |
Character(1). Gene‑set to plot (must exist in the enrichment matrix). |
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 centered/scaled (Z‑score) prior to plotting. |
facet.by |
Optional metadata column used to facet the plot. |
summarise.by |
Optional metadata column used to summarise data. |
summary.stat |
Optional method used to summarize expression within each
group defined by |
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)
geyserEnrichment(pbmc,
assay = "escape",
gene.set = "Tcells")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.