do_NebulosaPlot {SCpubr} | R Documentation |
Wrapper for Nebulosa::plot_density in Seurat.
Description
Wrapper for Nebulosa::plot_density in Seurat.
Usage
do_NebulosaPlot(
sample,
features,
slot = NULL,
dims = c(1, 2),
pt.size = 1,
reduction = NULL,
combine = TRUE,
method = c("ks", "wkde"),
joint = FALSE,
return_only_joint = FALSE,
plot.title = NULL,
plot.subtitle = NULL,
plot.caption = NULL,
legend.type = "colorbar",
legend.framewidth = 0.5,
legend.tickwidth = 0.5,
legend.length = 20,
legend.width = 1,
legend.framecolor = "grey50",
legend.tickcolor = "white",
font.size = 14,
font.type = "sans",
legend.position = "bottom",
plot_cell_borders = TRUE,
border.size = 2,
border.color = "black",
viridis.palette = "G",
viridis.direction = 1,
verbose = TRUE,
na.value = "grey75",
plot.axes = FALSE,
number.breaks = 5,
use_viridis = FALSE,
sequential.palette = "YlGnBu",
sequential.direction = 1,
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"
)
Arguments
sample |
|
features |
|
slot |
|
dims |
|
pt.size |
|
reduction |
|
combine |
|
method |
Kernel density estimation method:
|
joint |
|
return_only_joint |
|
plot.title , plot.subtitle , plot.caption |
|
legend.type |
|
legend.framewidth , legend.tickwidth |
|
legend.length , legend.width |
|
legend.framecolor |
|
legend.tickcolor |
|
font.size |
|
font.type |
|
legend.position |
|
plot_cell_borders |
|
border.size |
|
border.color |
|
viridis.palette |
|
viridis.direction |
|
verbose |
|
na.value |
|
plot.axes |
|
number.breaks |
|
use_viridis |
|
sequential.palette |
|
sequential.direction |
|
plot.title.face , plot.subtitle.face , plot.caption.face , axis.title.face , axis.text.face , legend.title.face , legend.text.face |
|
Value
A ggplot2 object containing a Nebulosa plot.
Examples
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_NebulosaPlot", 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"))
# Basic Nebulosa plot.
p <- SCpubr::do_NebulosaPlot(sample = sample,
features = "EPC1")
# Compute joint density.
p <- SCpubr::do_NebulosaPlot(sample = sample,
features = c("EPC1", "TOX2"),
joint = TRUE)
} 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()`.")
}