Description Usage Arguments Details Value Examples
2-D embedding of transcriptomes for visualization
1 | PlotEmbedding(object, embedding = "tsne", use.subsamples = TRUE, ...)
|
object |
A SingleCellExperiment object containing normalized expression values in |
embedding |
Type of embedding to use, one of |
use.subsamples |
logical indicating if sub-samples should be used for the post-hoc projection of the coordinates of remaining samples. |
... |
|
Performs 2D embedding on sampled cells followed by the post-hoc projection of 2D co-ordinated of unsampled cells. An ad-hoc clean up is also carried out to keep away stray points away from the plot - NA value is assigned to such points.
A SingleCellExperiment object with a new entry under the
reducedDim()
containter to store the reduced dimension components
with the name from the argument embedding
.
1 2 3 4 5 6 7 8 9 10 11 | library(SingleCellExperiment)
ncells <- 100
ngenes <- 2000
x <- matrix(rpois(ncells*ngenes, lambda = 10), ncol=ncells, nrow=ngenes, byrow=TRUE)
rownames(x) <- paste0("Gene", seq_len(ngenes))
colnames(x) <- paste0("Cell", seq_len(ncells))
sce <- SingleCellExperiment(list(counts=x))
sce <- CountNormalize(sce)
sce <- RankGenes(sce)
sce <- PlotEmbedding(sce)
plot(reducedDim(sce, "tsne"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.