View source: R/do_RankedExpressionPlot.R
do_RankedExpressionPlot | R Documentation |
Compute a heatmap of enrichment of gene sets on the context of a diffusion component.
do_RankedExpressionPlot(
sample,
features,
assay = NULL,
slot = NULL,
dims = 1:2,
subsample = 2500,
reduction = NULL,
group.by = NULL,
colors.use = NULL,
raster = FALSE,
interpolate = FALSE,
nbin = 24,
ctrl = 100,
main.heatmap.size = 0.95,
enforce_symmetry = TRUE,
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 |
|
features |
|
assay |
|
slot |
|
dims |
|
subsample |
|
reduction |
|
group.by |
|
colors.use |
|
raster |
|
interpolate |
|
nbin |
|
ctrl |
|
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_RankedExpressionPlot", 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 <- rownames(sample)[1:15]
# This will query, for the provided components, the expression of the genes
# for all cells and plot them in the context of the cells reordered by
# the position alongside each dimensional reduction component.
p <- SCpubr::do_RankedExpressionPlot(sample = sample,
features = genes,
nbin = 1,
ctrl = 5,
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.