plotQuaternary.Seurat {CytoSimplex} | R Documentation |
Craete quaternary simplex plot with Seurat object
Description
Create quaternary plots that show similarity between single cells and selected four terminals in a baricentric coordinate.
See plotTernary
for more details on methodologies.
A dynamic rotating view in a GIF image file can be created with
writeQuaternaryGIF
. Package magick
must be installed in
advance. Linux users may refer to this
installation guide.
Usage
## S3 method for class 'Seurat'
plotQuaternary(
x,
layer = "counts",
assay = NULL,
clusterVar = NULL,
processed = FALSE,
dotColorBy = NULL,
legendTitle = NULL,
...
)
Arguments
x |
A Seurat object |
layer |
Layer in the specified assay to use. Default |
assay |
The assay to get data from. Default |
clusterVar |
A variable name in meta.data ( |
processed |
Logical. Whether the input matrix is already processed.
|
dotColorBy |
A vector/factor for coloring dots, can be either categorical
(must be character or factor) or continuous. Default |
legendTitle |
Title on the legend/colorbar. Default |
... |
Arguments passed on to
|
Value
By default, a "plotly" object. When interactive = FALSE
, a
"quatPlot" object when byCluster
is not specified, or a "list" of
"quatPlot" objects when byCluster
is specified. When
returnData = TRUE
, a list of similarity matrix and aggregated velocity
matrix is returned.
See Also
Other plotQuaternary:
plotQuaternary()
,
plotQuaternary.SingleCellExperiment()
Examples
# Seurat example
if (requireNamespace("Seurat", quietly = TRUE)) {
require(Seurat)
srt <- CreateSeuratObject(rnaRaw)
Idents(srt) <- rnaCluster
gene <- selectTopFeatures(srt, vertices = c("OS", "RE", "CH", "ORT"))
plotQuaternary(srt, features = gene,
vertices = c("OS", "RE", "CH", "ORT"))
}