ClusteringScatterPlot | R Documentation |
ClusteringScatterPlot function enables visualizing the clustering over nonliner dimensionality reduction (t-SNE or UMAP).
ClusteringScatterPlot.SingleCellExperiment( object, clustering.type, return.plot, dim.reduction.type, point.size, title, show.legend ) ## S4 method for signature 'SingleCellExperiment' ClusteringScatterPlot( object, clustering.type = "manual", return.plot = FALSE, dim.reduction.type = "", point.size = 0.7, title = "", show.legend = TRUE )
object |
of |
clustering.type |
"manual" or "optimal". "manual" refers to the clustering formed using the "SelectKClusters" function and "optimal" to the clustering formed using the "CalcSilhInfo" function. Default is "manual". |
return.plot |
a logical denoting whether to return the ggplot2 object.
Default is |
dim.reduction.type |
"tsne" or "umap". Default is "tsne". |
point.size |
point size. Default is Default is |
title |
text to write above the plot |
show.legend |
whether to show the legend on the right side of the plot.
Default is |
ggplot2 object if return.plot=TRUE
library(SingleCellExperiment) sce <- SingleCellExperiment(assays = list(logcounts = pbmc3k_500)) sce <- PrepareILoReg(sce) ## These settings are just to accelerate the example, use the defaults. sce <- RunParallelICP(sce,L=2,threads=1,C=0.1,k=5,r=1) sce <- RunPCA(sce,p=5) sce <- HierarchicalClustering(sce) sce <- SelectKClusters(sce,K=5) sce <- RunTSNE(sce) ClusteringScatterPlot(sce,"manual",dim.reduction.type="tsne") sce <- RunUMAP(sce) ClusteringScatterPlot(sce,"manual",dim.reduction.type="umap")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.