View source: R/do_FeaturePlot.R
do_FeaturePlot | R Documentation |
Wrapper for FeaturePlot.
do_FeaturePlot(
sample,
features,
assay = NULL,
reduction = NULL,
slot = NULL,
order = FALSE,
group.by = NULL,
group.by.colors.use = NULL,
group.by.legend = NULL,
group.by.show.dots = TRUE,
group.by.dot.size = 8,
group.by.cell_borders = FALSE,
group.by.cell_borders.alpha = 0.1,
split.by = NULL,
idents.keep = NULL,
cells.highlight = NULL,
idents.highlight = NULL,
dims = c(1, 2),
enforce_symmetry = FALSE,
symmetry.type = "absolute",
symmetry.center = NA,
pt.size = 1,
font.size = 14,
font.type = "sans",
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.nrow = NULL,
legend.byrow = FALSE,
plot.title = NULL,
plot.subtitle = NULL,
plot.caption = NULL,
individual.titles = NULL,
individual.subtitles = NULL,
individual.captions = NULL,
ncol = NULL,
use_viridis = FALSE,
viridis.palette = "G",
viridis.direction = 1,
raster = FALSE,
raster.dpi = 1024,
plot_cell_borders = TRUE,
border.size = 2,
border.color = "black",
border.density = 1,
na.value = "grey75",
verbose = TRUE,
plot.axes = FALSE,
min.cutoff = rep(NA, length(features)),
max.cutoff = rep(NA, length(features)),
plot_density_contour = FALSE,
contour.position = "bottom",
contour.color = "grey90",
contour.lineend = "butt",
contour.linejoin = "round",
contour_expand_axes = 0.25,
label = FALSE,
label.color = "black",
label.size = 4,
number.breaks = 5,
diverging.palette = "RdBu",
diverging.direction = -1,
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"
)
sample |
|
features |
|
assay |
|
reduction |
|
slot |
|
order |
|
group.by |
|
group.by.colors.use |
|
group.by.legend |
|
group.by.show.dots |
|
group.by.dot.size |
|
group.by.cell_borders |
|
group.by.cell_borders.alpha |
|
split.by |
|
idents.keep |
|
cells.highlight, idents.highlight |
|
dims |
|
enforce_symmetry |
|
symmetry.type |
|
symmetry.center |
|
pt.size |
|
font.size |
|
font.type |
|
legend.title |
|
legend.type |
|
legend.position |
|
legend.framewidth, legend.tickwidth |
|
legend.length, legend.width |
|
legend.framecolor |
|
legend.tickcolor |
|
legend.ncol |
|
legend.nrow |
|
legend.byrow |
|
plot.title, plot.subtitle, plot.caption |
|
individual.titles, individual.subtitles, individual.captions |
|
ncol |
|
use_viridis |
|
viridis.palette |
|
viridis.direction |
|
raster |
|
raster.dpi |
|
plot_cell_borders |
|
border.size |
|
border.color |
|
border.density |
|
na.value |
|
verbose |
|
plot.axes |
|
min.cutoff, max.cutoff |
|
plot_density_contour |
|
contour.position |
|
contour.color |
|
contour.lineend |
|
contour.linejoin |
|
contour_expand_axes |
|
label |
|
label.color |
|
label.size |
|
number.breaks |
|
diverging.palette |
|
diverging.direction |
|
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 |
|
A ggplot2 object containing a Feature Plot.
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_FeaturePlot", 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"))
# Regular FeaturePlot.
p <- SCpubr::do_FeaturePlot(sample = sample,
features = "nCount_RNA")
# FeaturePlot with a subset of identities
# (in Seurat::Idents(sample)) maintaining the original UMAP shape.
idents.use <- levels(sample)[!(levels(sample) %in% c("2", "5", "8"))]
p <- SCpubr::do_FeaturePlot(sample = sample,
idents.highlight = idents.use,
features = c("EPC1"))
# Splitting the FeaturePlot by a variable and
# maintaining the color scale and the UMAP shape.
p <- SCpubr::do_FeaturePlot(sample = sample,
features = "EPC1",
split.by = "seurat_clusters")
} 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.