Description Usage Arguments Value Examples
GeneScatterPlot enables visualizing gene expression of a gene over nonlinear dimensionality reduction with t-SNE or UMAP.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | GeneScatterPlot.SingleCellExperiment(
object,
genes,
return.plot,
dim.reduction.type,
point.size,
title,
plot.expressing.cells.last,
nrow,
ncol
)
## S4 method for signature 'SingleCellExperiment'
GeneScatterPlot(
object,
genes = "",
return.plot = FALSE,
dim.reduction.type = "tsne",
point.size = 0.7,
title = "",
plot.expressing.cells.last = FALSE,
nrow = NULL,
ncol = NULL
)
|
object |
of |
genes |
a character vector of the genes to be visualized |
return.plot |
whether to return the ggplot2 object or just
draw it (default |
dim.reduction.type |
"tsne" or "umap" (default "tsne") |
point.size |
point size (default 0.7) |
title |
text to write above the plot |
plot.expressing.cells.last |
whether to plot the expressing genes last to make the points more visible |
nrow |
a positive integer that specifies the number of rows in
the plot grid. Default is |
ncol |
a positive integer that specifies the number of columns
in the plot grid. Default is |
ggplot2 object if return.plot=TRUE
1 2 3 4 5 6 7 8 9 10 | 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 <- RunTSNE(sce)
GeneScatterPlot(sce,"CD14",dim.reduction.type="tsne")
sce <- RunUMAP(sce)
GeneScatterPlot(sce,"CD14",dim.reduction.type="umap")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.