plotTernary.SingleCellExperiment | R Documentation |
Create ternary plots that show similarity between single cells and selected three terminals in a ternary baricentric coordinate.
## S3 method for class 'SingleCellExperiment'
plotTernary(
x,
assay.type = "counts",
clusterVar = NULL,
processed = FALSE,
dotColorBy = NULL,
legendTitle = NULL,
...
)
x |
A SingleCellExperiment object. |
assay.type |
Assay to use for calculating the similarity. Default
|
clusterVar |
A variable name in |
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
|
By default, a "ggplot" object when byCluster
is not specified,
a list of "ggplot" object when byCluster
is specified. When
interactive = TRUE
, a "plotly" object is returned. When
returnData = TRUE
, a list of similarity matrix and aggregated velocity
matrix is returned.
Other plotTernary:
plotTernary()
,
plotTernary.Seurat()
# SingleCellExperiment example
library(SingleCellExperiment)
sce <- SingleCellExperiment(assays = list(counts = rnaRaw))
colLabels(sce) <- rnaCluster
gene <- selectTopFeatures(sce, vertices = c("OS", "RE", "CH"))
plotTernary(sce, features = gene, vertices = c("OS", "RE", "CH"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.