Description Usage Arguments Value Plot top markers Author(s) See Also Examples
Plot gene expression per cell in multiple formats:
plotMarkerTSNE()
: t-SNE gene expression plot.
plotDot()
: Dot plot.
plotViolin()
: Violin plot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | plotKnownMarkersDetected(object, ...)
plotMarkerTSNE(object, ...)
plotMarkerUMAP(object, ...)
plotTopMarkers(object, ...)
## S4 method for signature 'SingleCellExperiment'
plotMarkerTSNE(object, genes,
expression = c("mean", "median", "sum"), color = NULL,
pointsAsNumbers = FALSE, pointSize = 0.75, pointAlpha = 0.8,
label = TRUE, labelSize = 6L, dark = FALSE, grid = FALSE,
legend = TRUE, aspectRatio = 1L, title = TRUE)
## S4 method for signature 'seurat'
plotMarkerTSNE(object, genes, expression = c("mean",
"median", "sum"), color = NULL, pointsAsNumbers = FALSE,
pointSize = 0.75, pointAlpha = 0.8, label = TRUE, labelSize = 6L,
dark = FALSE, grid = FALSE, legend = TRUE, aspectRatio = 1L,
title = TRUE)
## S4 method for signature 'SingleCellExperiment'
plotMarkerUMAP(object, genes,
expression = c("mean", "median", "sum"), color = NULL,
pointsAsNumbers = FALSE, pointSize = 0.75, pointAlpha = 0.8,
label = TRUE, labelSize = 6L, dark = FALSE, grid = FALSE,
legend = TRUE, aspectRatio = 1L, title = TRUE)
## S4 method for signature 'seurat'
plotMarkerUMAP(object, genes, expression = c("mean",
"median", "sum"), color = NULL, pointsAsNumbers = FALSE,
pointSize = 0.75, pointAlpha = 0.8, label = TRUE, labelSize = 6L,
dark = FALSE, grid = FALSE, legend = TRUE, aspectRatio = 1L,
title = TRUE)
## S4 method for signature 'SingleCellExperiment'
plotTopMarkers(object, markers,
reduction = c("TSNE", "UMAP"), headerLevel = 2L, ...)
## S4 method for signature 'seurat'
plotTopMarkers(object, markers, reduction = c("TSNE",
"UMAP"), headerLevel = 2L, ...)
## S4 method for signature 'SingleCellExperiment'
plotKnownMarkersDetected(object, markers,
reduction = c("TSNE", "UMAP"), headerLevel = 2L, ...)
## S4 method for signature 'seurat'
plotKnownMarkersDetected(object, markers,
reduction = c("TSNE", "UMAP"), headerLevel = 2L, ...)
|
object |
Object. |
... |
Additional arguments. |
genes |
Gene identifiers. Must match the rownames of the object. |
expression |
Calculation to apply. Uses |
color |
Desired ggplot color scale. Must supply discrete values. When
set to |
pointsAsNumbers |
Plot the points as numbers ( |
pointSize |
Cell point size. |
pointAlpha |
Alpha transparency level. Useful when there many cells in the dataset, and some cells can be masked. |
label |
Overlay a cluster identitiy label on the plot. |
labelSize |
Size of the text label. |
dark |
Plot against a dark background using
|
grid |
Show major grid lines but hide axis lines. |
legend |
Include plot legend. |
aspectRatio |
Aspect ratio. |
title |
Plot title. |
markers |
|
reduction |
Dimensional reduction method to apply. Defaults to t-SNE
(" |
headerLevel |
R Markdown header level. |
Show graphical output. Invisibly return ggplot
list
.
The number of markers to plot is determined by the output of the
topMarkers()
function. If you want to reduce the number of genes to plot,
simply reassign first using that function. If necessary, we can add support
for the number of genes to plot here in a future update.
Michael Steinbaugh, Rory Kirchner
Other Clustering Functions: cellTypesPerCluster
,
knownMarkersDetected
,
plotCellTypesPerCluster
,
plotFeatureTSNE
, plotPCElbow
,
plotTSNE
, sanitizeMarkers
,
topMarkers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | object <- seurat_small
title <- "mito genes"
genes <- grep("^MT-", rownames(object), value = TRUE)
print(genes)
# t-SNE
plotMarkerTSNE(
object = object,
genes = genes,
title = title
)
# Dark mode
plotMarkerTSNE(
object = object,
genes = genes,
dark = TRUE,
title = title
)
# Number cloud
plotMarkerTSNE(
object = object,
genes = genes,
pointsAsNumbers = TRUE,
title = title
)
# UMAP
plotMarkerUMAP(
object = object,
genes = genes,
title = title
)
# Top markers
markers <- topMarkers(all_markers_small, n = 1)
markers
plotTopMarkers(object, markers = tail(markers, 1))
# Known markers detected
markers <- head(known_markers_small, n = 1)
markers
plotKnownMarkersDetected(object, markers = head(markers, 1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.