plotMarker | R Documentation |
Visualize gene markers on a reduced dimension plot (e.g. t-SNE, UMAP).
plotMarker(object, ...)
## S4 method for signature 'SingleCellExperiment'
plotMarker(
object,
genes,
reduction = "UMAP",
expression = c("mean", "sum"),
color = getOption(x = "acid.continuous.color", default =
ggplot2::scale_color_gradient(low = "gray75", high = "purple")),
pointSize = getOption(x = "acid.point.size", default = 1L),
pointAlpha = getOption(x = "acid.point.alpha", default = 0.9),
pointsAsNumbers = getOption(x = "acid.points.as.numbers", default = FALSE),
label = getOption(x = "acid.label", default = FALSE),
labelSize = getOption(x = "acid.label.size", default = 6L),
dark = getOption(x = "acid.dark", default = FALSE),
legend = getOption(x = "acid.legend", default = TRUE),
labels = list(title = "auto", subtitle = NULL)
)
object |
Object. |
genes |
|
reduction |
|
expression |
|
color |
To set the discrete color palette globally, use: options("acid.color.discrete" = ggplot2::scale_color_viridis_d()) |
pointSize |
|
pointAlpha |
|
pointsAsNumbers |
|
label |
|
labelSize |
|
dark |
|
legend |
|
labels |
|
... |
Additional arguments. |
Show graphical output.
Invisibly return a ggplot
list
.
Updated 2023-08-10.
Michael Steinbaugh, Rory Kirchner
requireNamespace("Matrix", quietly = TRUE)
requireNamespace("SingleCellExperiment", quietly = TRUE)
data(SingleCellExperiment_Seurat, package = "AcidTest")
## SingleCellExperiment ====
object <- SingleCellExperiment_Seurat
counts <- SingleCellExperiment::counts(object)
sums <- sort(Matrix::rowSums(counts), decreasing = TRUE)
genes <- names(head(sums, n = 4L))
plotMarker(
object = object,
genes = genes,
reduction = "UMAP"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.