celdaTsne,celda_G-method {celda} | R Documentation |
Embeds cells in two dimensions using tSNE based on a 'celda_G' model. tSNE is run on module probabilities to reduce the number of features instead of using PCA. Module probabilities square-root trasformed before applying tSNE.
## S4 method for signature 'celda_G' celdaTsne(counts, celdaMod, maxCells = 25000, minClusterSize = 100, initialDims = 20, modules = NULL, perplexity = 20, maxIter = 2500, seed = 12345)
counts |
Integer matrix. Rows represent features and columns represent cells. This matrix should be the same as the one used to generate 'celdaMod'. |
celdaMod |
Celda object of class 'celda_G'. |
maxCells |
Integer. Maximum number of cells to plot. Cells will be randomly subsampled if ncol(conts) > maxCells. Larger numbers of cells requires more memory. Default 10000. |
minClusterSize |
Integer. Do not subsample cell clusters below this threshold. Default 100. |
initialDims |
Integer. PCA will be used to reduce the dimentionality 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 NULL, all modules will be used. Default NULL. |
perplexity |
Numeric. Perplexity parameter for tSNE. Default 20. |
maxIter |
Integer. Maximum number of iterations in tSNE generation. Default 2500. |
seed |
Integer. Passed to with_seed. For reproducibility, a default value of 12345 is used. If NULL, no calls to with_seed are made. |
A two column matrix of t-SNE coordinates.
'celda_G()' for clustering features and 'celdaHeatmap()' for displaying expression
data(celdaGSim, celdaGMod) tsneRes <- celdaTsne(celdaGSim$counts, celdaGMod)