Embeds cells in two dimensions using tSNE based on celda_CG results.

# S3 method for celda_G
celdaTsne(counts, celda.mod, max.cells = 10000,
  modules = NULL, perplexity = 20, max.iter = 2500, seed = 12345, ...)

Arguments

counts

Integer matrix. Rows represent features and columns represent cells. This matrix should be the same as the one used to generate `celda.mod`.

celda.mod

Celda object of class "celda_G".

max.cells

Integer. Maximum number of cells to plot. Cells will be randomly subsampled if ncol(conts) > max.cells. Larger numbers of cells requires more memory. Default 10000.

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.

max.iter

Integer. Maximum number of iterations in tSNE generation. Default 2500.

seed

Integer. Passed to set.seed(). Default 12345.

...

Additional parameters.

Examples

celda.sim = simulateCells("celda_G") celda.mod = celda_G(celda.sim$counts, L=celda.sim$L)
#> --------------------------------------------------------------------
#> Starting Celda_G: Clustering genes.
#> --------------------------------------------------------------------
#> Thu Sep 06 12:56:12 2018 .. Initializing chain 1 with 'random' (seed=12345)
#> Thu Sep 06 12:56:12 2018 .... Completed iteration: 1 | logLik: -291426.665356919
#> Thu Sep 06 12:56:12 2018 .... Completed iteration: 2 | logLik: -286595.332370062
#> Thu Sep 06 12:56:12 2018 .... Completed iteration: 3 | logLik: -286579.864858824
#> Thu Sep 06 12:56:12 2018 .... Completed iteration: 4 | logLik: -286579.864858824
#> Thu Sep 06 12:56:12 2018 .... Completed iteration: 5 | logLik: -286579.864858824
#> Thu Sep 06 12:56:12 2018 .... Completed iteration: 6 | logLik: -286579.864858824
#> Thu Sep 06 12:56:12 2018 .... Completed iteration: 7 | logLik: -286579.864858824
#> Thu Sep 06 12:56:12 2018 .... Completed iteration: 8 | logLik: -286579.864858824
#> Thu Sep 06 12:56:12 2018 .... Completed iteration: 9 | logLik: -286579.864858824
#> Thu Sep 06 12:56:12 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:56:12 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:56:12 2018 .... Completed iteration: 10 | logLik: -286579.864858824
#> Thu Sep 06 12:56:13 2018 .... Completed iteration: 11 | logLik: -286579.864858824
#> Thu Sep 06 12:56:13 2018 .... Completed iteration: 12 | logLik: -286579.864858824
#> Thu Sep 06 12:56:13 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:56:13 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:56:13 2018 .... Completed iteration: 13 | logLik: -286579.864858824
#> Thu Sep 06 12:56:13 2018 .. Finished chain 1 with seed 12345
#> Thu Sep 06 12:56:13 2018 .. Initializing chain 2 with 'random' (seed=12346)
#> Thu Sep 06 12:56:13 2018 .... Completed iteration: 1 | logLik: -287718.041765169
#> Thu Sep 06 12:56:13 2018 .... Completed iteration: 2 | logLik: -286579.864858824
#> Thu Sep 06 12:56:13 2018 .... Completed iteration: 3 | logLik: -286579.864858824
#> Thu Sep 06 12:56:13 2018 .... Completed iteration: 4 | logLik: -286579.864858824
#> Thu Sep 06 12:56:13 2018 .... Completed iteration: 5 | logLik: -286579.864858824
#> Thu Sep 06 12:56:13 2018 .... Completed iteration: 6 | logLik: -286579.864858824
#> Thu Sep 06 12:56:13 2018 .... Completed iteration: 7 | logLik: -286579.864858824
#> Thu Sep 06 12:56:13 2018 .... Completed iteration: 8 | logLik: -286579.864858824
#> Thu Sep 06 12:56:13 2018 .... Completed iteration: 9 | logLik: -286579.864858824
#> Thu Sep 06 12:56:13 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:56:14 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:56:14 2018 .... Completed iteration: 10 | logLik: -286579.864858824
#> Thu Sep 06 12:56:14 2018 .... Completed iteration: 11 | logLik: -286579.864858824
#> Thu Sep 06 12:56:14 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:56:14 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:56:14 2018 .... Completed iteration: 12 | logLik: -286579.864858824
#> Thu Sep 06 12:56:14 2018 .. Finished chain 2 with seed 12346
#> Thu Sep 06 12:56:14 2018 .. Initializing chain 3 with 'random' (seed=12347)
#> Thu Sep 06 12:56:14 2018 .... Completed iteration: 1 | logLik: -290090.898941072
#> Thu Sep 06 12:56:14 2018 .... Completed iteration: 2 | logLik: -286579.864858824
#> Thu Sep 06 12:56:14 2018 .... Completed iteration: 3 | logLik: -286579.864858824
#> Thu Sep 06 12:56:14 2018 .... Completed iteration: 4 | logLik: -286579.864858824
#> Thu Sep 06 12:56:14 2018 .... Completed iteration: 5 | logLik: -286579.864858824
#> Thu Sep 06 12:56:14 2018 .... Completed iteration: 6 | logLik: -286579.864858824
#> Thu Sep 06 12:56:14 2018 .... Completed iteration: 7 | logLik: -286579.864858824
#> Thu Sep 06 12:56:14 2018 .... Completed iteration: 8 | logLik: -286579.864858824
#> Thu Sep 06 12:56:14 2018 .... Completed iteration: 9 | logLik: -286579.864858824
#> Thu Sep 06 12:56:14 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:56:15 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:56:15 2018 .... Completed iteration: 10 | logLik: -286579.864858824
#> Thu Sep 06 12:56:15 2018 .... Completed iteration: 11 | logLik: -286579.864858824
#> Thu Sep 06 12:56:15 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:56:15 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:56:15 2018 .... Completed iteration: 12 | logLik: -286579.864858824
#> Thu Sep 06 12:56:15 2018 .. Finished chain 3 with seed 12347
#> --------------------------------------------------------------------
#> Completed Celda_G. Total time: 3.51099 secs
#> --------------------------------------------------------------------
tsne.res = celdaTsne(celda.sim$counts, celda.mod)