View source: R/do_RankedEnrichmentPlot.R
do_RankedEnrichmentPlot | R Documentation |
Compute a heatmap of enrichment of gene sets on the context of a diffusion component.
do_RankedEnrichmentPlot(
sample,
input_gene_list,
assay = NULL,
slot = NULL,
scale.enrichment = TRUE,
dims = 1:2,
subsample = 2500,
reduction = NULL,
group.by = NULL,
colors.use = NULL,
raster = FALSE,
interpolate = FALSE,
nbin = 24,
ctrl = 100,
flavor = "Seurat",
main.heatmap.size = 0.95,
enforce_symmetry = ifelse(isTRUE(scale.enrichment), TRUE, FALSE),
use_viridis = FALSE,
viridis.palette = "G",
viridis.direction = -1,
sequential.palette = "YlGnBu",
sequential.direction = 1,
font.size = 14,
font.type = "sans",
na.value = "grey75",
legend.width = 1,
legend.length = 20,
legend.framewidth = 0.5,
legend.tickwidth = 0.5,
legend.framecolor = "grey50",
legend.tickcolor = "white",
legend.type = "colorbar",
legend.position = "bottom",
legend.nrow = NULL,
legend.ncol = NULL,
legend.byrow = FALSE,
number.breaks = 5,
diverging.palette = "RdBu",
diverging.direction = -1,
axis.text.x.angle = 45,
border.color = "black",
return_object = FALSE,
verbose = FALSE,
plot.title.face = "bold",
plot.subtitle.face = "plain",
plot.caption.face = "italic",
axis.title.face = "bold",
axis.text.face = "plain",
legend.title.face = "bold",
legend.text.face = "plain"
)
sample |
|
input_gene_list |
|
assay |
|
slot |
|
scale.enrichment |
|
dims |
|
subsample |
|
reduction |
|
group.by |
|
colors.use |
|
raster |
|
interpolate |
|
nbin |
|
ctrl |
|
flavor |
|
main.heatmap.size |
|
enforce_symmetry |
|
use_viridis |
|
viridis.palette |
|
viridis.direction |
|
sequential.palette |
|
sequential.direction |
|
font.size |
|
font.type |
|
na.value |
|
legend.length , legend.width |
|
legend.framewidth , legend.tickwidth |
|
legend.framecolor |
|
legend.tickcolor |
|
legend.type |
|
legend.position |
|
legend.nrow |
|
legend.ncol |
|
legend.byrow |
|
number.breaks |
|
diverging.palette |
|
diverging.direction |
|
axis.text.x.angle |
|
border.color |
|
return_object |
|
verbose |
|
plot.title.face , plot.subtitle.face , plot.caption.face , axis.title.face , axis.text.face , legend.title.face , legend.text.face |
|
A list of ggplot2 objects and a Seurat object if desired.
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_RankedEnrichmentPlot", passive = TRUE)
if (isTRUE(value)){
# Consult the full documentation in https://enblacar.github.io/SCpubr-book/
# Define your Seurat object.
sample <- readRDS(system.file("extdata/seurat_dataset_example.rds", package = "SCpubr"))
# Genes have to be unique.
genes <- list("A" = rownames(sample)[1:5],
"B" = rownames(sample)[6:10],
"C" = rownames(sample)[11:15])
# This will query, for the provided components, the enrichment of the gene
# sets for all cells and plot them in the context of the cells reordered by
# the position alongside each dimensional reduction component.
p <- SCpubr::do_RankedEnrichmentPlot(sample = sample,
input_gene_list = genes,
nbin = 1,
ctrl = 5,
flavor = "Seurat",
subsample = NA,
dims = 1:2,
verbose = FALSE)
p
} else if (base::isFALSE(value)){
message("This function can not be used without its suggested packages.")
message("Check out which ones are needed using `SCpubr::state_dependencies()`.")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.