plotManifold {CellTrails} | R Documentation |
Method visualizes an approximation of the manifold in the latent space in two dimensions.
plotManifold(sce, color_by = c("phenoName", "featureName"), name, perplexity = 30, recalculate = FALSE)
sce |
A |
color_by |
Indicates if nodes are colorized by a feature expression ('featureName') or phenotype label ('phenoName') |
name |
A character string specifying the featureName or phenoName |
perplexity |
Perplexity parameter for tSNE computation (default: 30) |
recalculate |
Indicates if tSNE should be recalcuated and results returned (default: FALSE) |
Visualizes the learned lower-dimensional manifold in two dimensions
using an approximation obtained by Barnes-Hut implementation of
t-Distributed Stochastic Neighbor Embedding
(tSNE; van der Maaten and Hinton 2008). Each point in this plot represents
a sample. Points can be colorized according
to feature expression or experimental metadata. The points' coloration can
be defined via the attributes color_by
and name
,
respectively. A previously computed tSNE visualization will be reused if
it was set accordingly (see manifold2D<-
). The parameter
perplexity
is used for the tSNE calculation.
A ggplot
object
Daniel C. Ellwanger
van der Maaten, L.J.P. & Hinton, G.E., 2008. Visualizing High-Dimensional Data Using t-SNE. Journal of Machine Learning Research, 9, pp.2579-2605.
Rtsne
latentSpace
manifold2D
# Example data data(exSCE) plotManifold(exSCE, color_by="featureName", name="feature_10") gp <- plotManifold(exSCE, color_by="phenoName", name="age", recalculate=TRUE) manifold2D(exSCE) <- gp