View source: R/heatmapEnrichment.R
heatmapEnrichment | R Documentation |
This function allows to the user to examine the heatmap with the mean enrichment values by group. The heatmap will have the gene sets as rows and columns will be the grouping variable.
heatmapEnrichment(
input.data,
assay = NULL,
group.by = NULL,
gene.set.use = "all",
cluster.rows = FALSE,
cluster.columns = FALSE,
facet.by = NULL,
scale = FALSE,
summary.stat = "mean",
palette = "inferno"
)
input.data |
Enrichment output from |
assay |
Name of the assay to plot if data is a single-cell object. |
group.by |
Categorical parameter to plot along the x.axis. If input is a single-cell object the default will be cluster. |
gene.set.use |
Selected gene sets to visualize. If "all", the heatmap will be generated across all gene sets. |
cluster.rows |
Use Euclidean distance to order the row values. |
cluster.columns |
Use Euclidean distance to order the column values. |
facet.by |
Variable to facet the plot into n distinct graphs. |
scale |
Visualize raw values FALSE or Z-transform enrichment values TRUE. |
summary.stat |
Use 'median' or 'mean' values to display. |
palette |
Colors to use in visualization - input any hcl.pals. |
ggplot2 object with heatmap of mean enrichment values
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)
heatmapEnrichment(pbmc_small,
assay = "escape")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.