View source: R/do_BeeSwarmPlot.R
do_BeeSwarmPlot | R Documentation |
BeeSwarm plot.
do_BeeSwarmPlot(
sample,
feature_to_rank,
group.by = NULL,
assay = NULL,
reduction = NULL,
slot = NULL,
continuous_feature = FALSE,
order = FALSE,
colors.use = NULL,
legend.title = NULL,
legend.type = "colorbar",
legend.position = "bottom",
legend.framewidth = 0.5,
legend.tickwidth = 0.5,
legend.length = 20,
legend.width = 1,
legend.framecolor = "grey50",
legend.tickcolor = "white",
legend.ncol = NULL,
legend.icon.size = 4,
plot.title = NULL,
plot.subtitle = NULL,
plot.caption = NULL,
xlab = NULL,
ylab = NULL,
font.size = 14,
font.type = "sans",
remove_x_axis = FALSE,
remove_y_axis = FALSE,
flip = FALSE,
use_viridis = FALSE,
viridis.palette = "G",
viridis.direction = 1,
sequential.palette = "YlGnBu",
sequential.direction = 1,
verbose = TRUE,
raster = FALSE,
raster.dpi = 300,
plot_cell_borders = TRUE,
border.size = 1.5,
border.color = "black",
pt.size = 2,
min.cutoff = NA,
max.cutoff = NA,
na.value = "grey75",
number.breaks = 5,
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 |
|
feature_to_rank |
|
group.by |
|
assay |
|
reduction |
|
slot |
|
continuous_feature |
|
order |
|
colors.use |
|
legend.title |
|
legend.type |
|
legend.position |
|
legend.framewidth , legend.tickwidth |
|
legend.length , legend.width |
|
legend.framecolor |
|
legend.tickcolor |
|
legend.ncol |
|
legend.icon.size |
|
plot.title , plot.subtitle , plot.caption |
|
xlab , ylab |
|
font.size |
|
font.type |
|
remove_x_axis , remove_y_axis |
|
flip |
|
use_viridis |
|
viridis.palette |
|
viridis.direction |
|
sequential.palette |
|
sequential.direction |
|
verbose |
|
raster |
|
raster.dpi |
|
plot_cell_borders |
|
border.size |
|
border.color |
|
pt.size |
|
min.cutoff , max.cutoff |
|
na.value |
|
number.breaks |
|
plot.title.face , plot.subtitle.face , plot.caption.face , axis.title.face , axis.text.face , legend.title.face , legend.text.face |
|
A ggplot2 object containing a Bee Swarm plot.
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_BeeSwarmPlot", 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 Bee Swarm plot - categorical coloring.
# This will color based on the unique values of seurat_clusters.
p <- SCpubr::do_BeeSwarmPlot(sample = sample,
feature_to_rank = "PC_1",
group.by = "seurat_clusters",
continuous_feature = FALSE)
# Basic Bee Swarm plot - continuous coloring.
# This will color based on the PC_1 values.
p <- SCpubr::do_BeeSwarmPlot(sample = sample,
feature_to_rank = "PC_1",
group.by = "seurat_clusters",
continuous_feature = 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()`.")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.