plotManifold: Visualize the learned manifold

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Method visualizes an approximation of the manifold in the latent space in two dimensions.

Usage

1
2
3
4
5
6
7
plotManifold(
  sce,
  color_by = c("phenoName", "featureName"),
  name,
  perplexity = 30,
  recalculate = FALSE
)

Arguments

sce

A SingleCellExperiment object

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)

Details

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.

Value

A ggplot object

Author(s)

Daniel C. Ellwanger

References

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.

See Also

Rtsne latentSpace manifold2D

Examples

1
2
3
4
5
6
7
# 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

CellTrails documentation built on Nov. 8, 2020, 5:53 p.m.