do_DimPlot | R Documentation |
Wrapper for DimPlot.
do_DimPlot(
sample,
reduction = NULL,
group.by = NULL,
split.by = NULL,
split.by.combined = TRUE,
colors.use = NULL,
shuffle = TRUE,
order = NULL,
raster = FALSE,
pt.size = 1,
label = FALSE,
label.color = "black",
label.fill = "white",
label.size = 4,
label.box = TRUE,
repel = FALSE,
cells.highlight = NULL,
idents.highlight = NULL,
idents.keep = NULL,
sizes.highlight = 1,
ncol = NULL,
plot.title = NULL,
plot.subtitle = NULL,
plot.caption = NULL,
legend.title = NULL,
legend.position = "bottom",
legend.title.position = "top",
legend.ncol = NULL,
legend.nrow = NULL,
legend.icon.size = 4,
legend.byrow = FALSE,
legend.dot.border = TRUE,
raster.dpi = 2048,
dims = c(1, 2),
font.size = 14,
font.type = "sans",
na.value = "grey75",
plot_cell_borders = TRUE,
border.size = 2,
border.color = "black",
border.density = 1,
plot_marginal_distributions = FALSE,
marginal.type = "density",
marginal.size = 5,
marginal.group = TRUE,
plot.axes = FALSE,
plot_density_contour = FALSE,
contour.position = "bottom",
contour.color = "grey90",
contour.lineend = "butt",
contour.linejoin = "round",
contour_expand_axes = 0.25,
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 |
|
reduction |
|
group.by |
|
split.by |
|
split.by.combined |
|
colors.use |
|
shuffle |
|
order |
|
raster |
|
pt.size |
|
label |
|
label.color |
|
label.fill |
|
label.size |
|
label.box |
|
repel |
|
cells.highlight , idents.highlight |
|
idents.keep |
|
sizes.highlight |
|
ncol |
|
plot.title , plot.subtitle , plot.caption |
|
legend.title |
|
legend.position |
|
legend.title.position |
|
legend.ncol |
|
legend.nrow |
|
legend.icon.size |
|
legend.byrow |
|
legend.dot.border |
|
raster.dpi |
|
dims |
|
font.size |
|
font.type |
|
na.value |
|
plot_cell_borders |
|
border.size |
|
border.color |
|
border.density |
|
plot_marginal_distributions |
|
marginal.type |
|
marginal.size |
|
marginal.group |
|
plot.axes |
|
plot_density_contour |
|
contour.position |
|
contour.color |
|
contour.lineend |
|
contour.linejoin |
|
contour_expand_axes |
|
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 DimPlot.
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_DimPlot", 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 DimPlot.
p <- SCpubr::do_DimPlot(sample = sample)
# Restrict the amount of identities displayed.
p <- SCpubr::do_DimPlot(sample = sample,
idents.keep = c("1", "3", "5"))
# Group by another variable rather than `Seurat::Idents(sample)`
p <- SCpubr::do_DimPlot(sample = sample,
group.by = "seurat_clusters")
# Split the output in as many plots as unique identities.
p <- SCpubr::do_DimPlot(sample = sample,
split.by = "seurat_clusters")
# Highlight given identities
p <- SCpubr::do_DimPlot(sample,
idents.highlight = c("1", "3"))
} 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.