View source: R/splitEnrichment.R
splitEnrichment | R Documentation |
This function allows to the user to examine the distribution of enrichment across groups by generating a split violin plot.
splitEnrichment(
input.data,
assay = NULL,
split.by = NULL,
group.by = NULL,
gene.set = NULL,
order.by = NULL,
facet.by = NULL,
scale = TRUE,
palette = "inferno"
)
input.data |
Enrichment output from |
assay |
Name of the assay to plot if data is a single-cell object. |
split.by |
Variable to form the split violin, must have 2 levels. |
group.by |
Categorical parameter to plot along the x.axis. If input is a single-cell object the default will be cluster. |
gene.set |
Gene set to plot (on y-axis). |
order.by |
Method to organize the x-axis - "mean" will arrange the x-axis by the mean of the gene.set, while "group" will arrange the x-axis by in alphanumerical order. Using NULL will not reorder the x-axis. |
facet.by |
Variable to facet the plot into n distinct graphs. |
scale |
Visualize raw values FALSE or Z-transform enrichment values TRUE. |
palette |
Colors to use in visualization - input any hcl.pals. |
ggplot2 object violin-based distributions of selected gene.set
GS <- list(Bcells = c("MS4A1", "CD79B", "CD79A", "IGH1", "IGH2"),
Tcells = c("CD3E", "CD3D", "CD3G", "CD7","CD8A"))
pbmc_small <- SeuratObject::pbmc_small
pbmc_small <- runEscape(pbmc_small,
gene.sets = GS,
min.size = NULL)
splitEnrichment(pbmc_small,
assay = "escape",
split.by = "groups",
gene.set = "Tcells")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.