plotCounts | R Documentation |
Plot counts
plotCounts(object, ...)
plotDots(object, ...)
plotViolin(object, ...)
## S4 method for signature 'SingleCellExperiment'
plotCounts(
object,
genes,
assay = c("logcounts", "normcounts"),
geom = c("violin", "dots"),
perSample = TRUE,
legend = getOption(x = "acid.legend", default = TRUE),
title = NULL
)
## S4 method for signature 'SummarizedExperiment'
plotCounts(
object,
genes,
assay = 1L,
interestingGroups = NULL,
convertGenesToSymbols = TRUE,
geom = c("point", "violin", "boxplot", "bar"),
trans = c("identity", "log2", "log10"),
line = c("none", "median", "mean", "geometricMean"),
legend = getOption(x = "acid.legend", default = TRUE),
style = c("facet", "wide"),
sort = FALSE,
labels = list(title = NULL, subtitle = NULL, sampleAxis = NULL, countAxis = "counts")
)
## S4 method for signature 'SingleCellExperiment'
plotDots(
object,
genes,
perSample = TRUE,
colMin = -2.5,
colMax = 2.5,
dotMin = 0L,
dotScale = 6L,
color = getOption(x = "acid.continuous.color", default =
ggplot2::scale_color_gradient2(low = "orange", mid = "gray75", high = "purple",
midpoint = 0L)),
legend = getOption(x = "acid.legend", default = TRUE),
title = NULL
)
## S4 method for signature 'SingleCellExperiment'
plotViolin(
object,
genes,
assay = c("logcounts", "normcounts"),
perSample = TRUE,
scale = c("count", "width", "area"),
color = getOption(x = "acid.discrete.color", default =
AcidPlots::acid_scale_color_synesthesia_d()),
legend = getOption(x = "acid.legend", default = TRUE),
title = NULL
)
object |
Object. |
genes |
|
assay |
|
geom |
|
perSample |
|
legend |
|
title |
|
interestingGroups |
|
convertGenesToSymbols |
|
trans |
For more information: help(topic = "scale_x_continuous", package = "ggplot2") |
line |
|
style |
|
sort |
|
labels |
|
colMin |
|
colMax |
|
dotMin |
|
dotScale |
|
color |
To set the discrete color palette globally, use: options("acid.color.discrete" = ggplot2::scale_color_viridis_d()) |
scale |
|
... |
Additional arguments. |
style = "facet"
: ggplot
grouped by sampleName
, with
ggplot2::facet_wrap()
applied to panel the samples.
style = "wide"
: ggplot
in wide format, with genes on the x-axis.
Updated 2023-12-04.
Seurat::DotPlot()
.
Seurat::VlnPlot()
.
Seurat::RidgePlot()
.
monocle3::plot_genes_violin()
.
data(
RangedSummarizedExperiment,
SingleCellExperiment_Seurat,
package = "AcidTest"
)
## SummarizedExperiment ====
object <- RangedSummarizedExperiment
rownames <- head(rownames(object))
print(rownames)
g2s <- AcidGenomes::GeneToSymbol(object)
geneIds <- head(g2s[[1L]])
print(geneIds)
geneNames <- head(g2s[[2L]])
print(geneNames)
## Rownames, gene IDs, and gene names (symbols) are supported.
plotCounts(object, genes = geneIds, style = "facet")
plotCounts(object, genes = geneNames, style = "wide")
## SingleCellExperiment ====
object <- SingleCellExperiment_Seurat
## Plotting with either gene IDs or gene names (symbols) works.
genes <- head(rownames(object), n = 4L)
print(genes)
## Per sample mode enabled.
plotCounts(object, genes = genes, perSample = TRUE)
## Per sample mode disabled.
plotCounts(object, genes = genes, perSample = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.