celdaTsne | R Documentation |
sce
objectEmbeds cells in two dimensions using Rtsne based
on a celda model. For celda_C sce
objects, PCA on the normalized
counts is used to reduce the number of features before applying t-SNE. For
celda_CG and celda_G sce
objects, tSNE is run on module
probabilities to reduce the number of features instead of using PCA.
Module probabilities are square-root transformed before applying tSNE.
celdaTsne(
sce,
useAssay = "counts",
altExpName = "featureSubset",
maxCells = NULL,
minClusterSize = 100,
initialDims = 20,
modules = NULL,
perplexity = 20,
maxIter = 2500,
normalize = "proportion",
scaleFactor = NULL,
transformationFun = sqrt,
seed = 12345
)
## S4 method for signature 'SingleCellExperiment'
celdaTsne(
sce,
useAssay = "counts",
altExpName = "featureSubset",
maxCells = NULL,
minClusterSize = 100,
initialDims = 20,
modules = NULL,
perplexity = 20,
maxIter = 2500,
normalize = "proportion",
scaleFactor = NULL,
transformationFun = sqrt,
seed = 12345
)
sce |
A SingleCellExperiment object returned by celda_C, celda_G, or celda_CG. |
useAssay |
A string specifying which assay slot to use. Default "counts". |
altExpName |
The name for the altExp slot to use. Default "featureSubset". |
maxCells |
Integer. Maximum number of cells to plot. Cells will be
randomly subsampled if |
minClusterSize |
Integer. Do not subsample cell clusters below this threshold. Default 100. |
initialDims |
Integer. PCA will be used to reduce the dimensionality of the dataset. The top 'initialDims' principal components will be used for tSNE. Default 20. |
modules |
Integer vector. Determines which feature modules to use for
tSNE. If |
perplexity |
Numeric. Perplexity parameter for tSNE. Default 20. |
maxIter |
Integer. Maximum number of iterations in tSNE generation. Default 2500. |
normalize |
Character. Passed to normalizeCounts in normalization step. Divides counts by the library sizes for each cell. One of 'proportion', 'cpm', 'median', or 'mean'. 'proportion' uses the total counts for each cell as the library size. 'cpm' divides the library size of each cell by one million to produce counts per million. 'median' divides the library size of each cell by the median library size across all cells. 'mean' divides the library size of each cell by the mean library size across all cells. |
scaleFactor |
Numeric. Sets the scale factor for cell-level
normalization. This scale factor is multiplied to each cell after the
library size of each cell had been adjusted in |
transformationFun |
Function. Applys a transformation such as 'sqrt',
'log', 'log2', 'log10', or 'log1p'. If |
seed |
Integer. Passed to with_seed. For reproducibility, a default value of 12345 is used. If NULL, no calls to with_seed are made. |
sce
with t-SNE coordinates
(columns "celda_tSNE1" & "celda_tSNE2") added to
reducedDim(sce, "celda_tSNE")
.
data(sceCeldaCG)
tsneRes <- celdaTsne(sceCeldaCG)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.