View source: R/do_SCEnrichmentHeatmap.R
do_SCEnrichmentHeatmap | R Documentation |
This function is heavily inspired by DoHeatmap
.
do_SCEnrichmentHeatmap(
sample,
input_gene_list,
assay = NULL,
slot = NULL,
group.by = NULL,
features.order = NULL,
metadata = NULL,
metadata.colors = NULL,
subsample = NA,
cluster = TRUE,
flavor = "Seurat",
return_object = FALSE,
ncores = 1,
storeRanks = TRUE,
interpolate = FALSE,
nbin = 24,
ctrl = 100,
xlab = "Cells",
ylab = "Genes",
font.size = 14,
font.type = "sans",
plot.title = NULL,
plot.subtitle = NULL,
plot.caption = NULL,
legend.position = "bottom",
legend.title = NULL,
legend.type = "colorbar",
legend.framewidth = 0.5,
legend.tickwidth = 0.5,
legend.length = 20,
legend.width = 1,
legend.framecolor = "grey50",
legend.tickcolor = "white",
strip.text.color = "black",
strip.text.angle = 0,
strip.spacing = 10,
legend.ncol = NULL,
legend.nrow = NULL,
legend.byrow = FALSE,
min.cutoff = NA,
max.cutoff = NA,
number.breaks = 5,
main.heatmap.size = 0.95,
enforce_symmetry = FALSE,
use_viridis = FALSE,
viridis.palette = "G",
viridis.direction = -1,
na.value = "grey75",
diverging.palette = "RdBu",
diverging.direction = -1,
sequential.palette = "YlGnBu",
sequential.direction = 1,
proportional.size = TRUE,
verbose = FALSE,
border.color = "black",
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 |
|
group.by |
|
features.order |
|
metadata |
|
metadata.colors |
|
subsample |
|
cluster |
|
flavor |
|
return_object |
|
ncores |
|
storeRanks |
|
interpolate |
|
nbin |
|
ctrl |
|
xlab , ylab |
|
font.size |
|
font.type |
|
plot.title , plot.subtitle , plot.caption |
|
legend.position |
|
legend.title |
|
legend.type |
|
legend.framewidth , legend.tickwidth |
|
legend.length , legend.width |
|
legend.framecolor |
|
legend.tickcolor |
|
strip.text.color |
|
strip.text.angle |
|
strip.spacing |
|
legend.ncol |
|
legend.nrow |
|
legend.byrow |
|
min.cutoff , max.cutoff |
|
number.breaks |
|
main.heatmap.size |
|
enforce_symmetry |
|
use_viridis |
|
viridis.palette |
|
viridis.direction |
|
na.value |
|
diverging.palette |
|
diverging.direction |
|
sequential.palette |
|
sequential.direction |
|
proportional.size |
|
verbose |
|
border.color |
|
plot.title.face , plot.subtitle.face , plot.caption.face , axis.title.face , axis.text.face , legend.title.face , legend.text.face |
|
A ggplot2 object.
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_SCEnrichmentHeatmap", 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])
p <- SCpubr::do_SCEnrichmentHeatmap(sample = sample,
input_gene_list = genes,
nbin = 1,
ctrl = 5,
flavor = "Seurat",
subsample = NA)
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.