plotPca | R Documentation |
Plot cell-level dimensionality reduction.
plotPca(object, ...)
plotReducedDim(object, ...)
plotTsne(object, ...)
plotUmap(object, ...)
## S4 method for signature 'SingleCellExperiment'
plotReducedDim(
object,
reduction = "UMAP",
dims = 1:2,
interestingGroups = NULL,
color = getOption(x = "acid.discrete.color", default =
AcidPlots::acid_scale_color_synesthesia_d()),
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 = NULL, subtitle = NULL)
)
## S4 method for signature 'SingleCellExperiment'
plotPca(object, ...)
## S4 method for signature 'SummarizedExperiment'
plotPca(
object,
assay = 1L,
interestingGroups = NULL,
ntop = 500L,
label = getOption(x = "acid.label", default = FALSE),
pointSize = getOption(x = "acid.point.size", default = 3L),
labels = list(title = "PCA", subtitle = NULL)
)
## S4 method for signature 'SingleCellExperiment'
plotTsne(object, ...)
## S4 method for signature 'SingleCellExperiment'
plotUmap(object, ...)
object |
Object. |
reduction |
|
dims |
|
interestingGroups |
|
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. |
assay |
|
ntop |
|
For SingleCellExperiment
, colors using ident
column defined in
colData()
by default.
ggplot
.
PCA: Principal Component Analysis.
t-SNE: t-distributed Stochastic Neighbor Embedding.
UMAP: Uniform Manifold Approximation and Projection.
plotPca
)PCA (Jolliffe, et al., 2002) is a multivariate technique that allows us to summarize the systematic patterns of variations in the data. PCA takes the expression levels for genes and transforms it in principal component space, reducing each sample into one point. Thereby, we can separate samples by expression variation, and identify potential sample outliers. The PCA plot is a way to look at how samples are clustering.
We're using a modified version of the DESeqTransform
method here.
UMAP calculation in R requires the Python module umap-learn
.
The UMAP module can be loaded in R using reticulate.
Updated 2022-03-07.
Michael Steinbaugh, Rory Kirchner
Jolliffe, et al., 2002.
DESeq2::plotPca()
.
Seurat::DimPlot()
.
monocle3::plot_cells()
.
data(
RangedSummarizedExperiment,
SingleCellExperiment_Seurat,
package = "AcidTest"
)
## SummarizedExperiment ====
object <- RangedSummarizedExperiment
plotPca(object)
## SingleCellExperiment ====
object <- SingleCellExperiment_Seurat
plotReducedDim(object, reduction = "UMAP")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.