View source: R/do_SCExpressionHeatmap.R
do_SCExpressionHeatmap | R Documentation |
This function is heavily inspired by DoHeatmap
.
do_SCExpressionHeatmap(
sample,
features,
assay = NULL,
slot = NULL,
group.by = NULL,
features.order = NULL,
metadata = NULL,
metadata.colors = NULL,
subsample = NA,
cluster = TRUE,
interpolate = FALSE,
xlab = "Cells",
ylab = "Genes",
font.size = 14,
font.type = "sans",
plot.title = NULL,
plot.subtitle = NULL,
plot.caption = NULL,
legend.position = "bottom",
legend.title = "Expression",
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 = TRUE,
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 |
|
features |
|
assay |
|
slot |
|
group.by |
|
features.order |
|
metadata |
|
metadata.colors |
|
subsample |
|
cluster |
|
interpolate |
|
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_SCExpressionHeatmap", 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"))
p <- SCpubr::do_SCExpressionHeatmap(sample = sample,
features = rownames(sample)[1:2],
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.