Create a scatterplot based off of a matrix containing the celda state probabilities per cell.

plotDimReduceState(dim1, dim2, counts, celda.mod, modules = NULL,
  rescale = TRUE, size = 1, xlab = "Dimension_1", ylab = "Dimension_2",
  color_low = "grey", color_mid = NULL, color_high = "blue")

Arguments

dim1

Numeric vector. First dimension from data dimensionality reduction output.

dim2

Numeric vector. Second dimension from data dimensionality reduction output.

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" or "celda_CG".

modules

Character vector. Module(s) from celda model to be plotted.

rescale

Logical. Whether rows of the matrix should be rescaled to [0,1]. Default TRUE.

size

Numeric. Sets size of point on plot. Default 1.

xlab

Character vector. Label for the x-axis. Default "Dimension_1".

ylab

Character vector. Label for the y-axis. Default "Dimension_2".

color_low

Character. A color available from `colors()`. The color will be used to signify the lowest values on the scale. Default 'grey'.

color_mid

Character. A color available from `colors()`. The color will be used to signify the midpoint on the scale.

color_high

Character. A color available from `colors()`. The color will be used to signify the highest values on the scale. Default 'blue'.

Examples

sim.res = simulateCells(model="celda_CG", K = 5, L = 5) celda_cg <- celda_CG(counts = sim.res$counts, K = 5, L = 5)
#> --------------------------------------------------------------------
#> Starting Celda_CG: Clustering cells and genes.
#> --------------------------------------------------------------------
#> Thu Sep 06 12:57:59 2018 .. Initializing chain 1 with 'random' (seed=12345)
#> Thu Sep 06 12:57:59 2018 .... Completed iteration: 1 | logLik: -1292432.99348905
#> Thu Sep 06 12:57:59 2018 .... Completed iteration: 2 | logLik: -1271152.8119707
#> Thu Sep 06 12:57:59 2018 .... Completed iteration: 3 | logLik: -1271146.08792976
#> Thu Sep 06 12:57:59 2018 .... Completed iteration: 4 | logLik: -1271142.13405322
#> Thu Sep 06 12:57:59 2018 .... Completed iteration: 5 | logLik: -1271138.7926281
#> Thu Sep 06 12:57:59 2018 .... Completed iteration: 6 | logLik: -1271139.37518801
#> Thu Sep 06 12:58:00 2018 .... Completed iteration: 7 | logLik: -1271135.02027059
#> Thu Sep 06 12:58:00 2018 .... Completed iteration: 8 | logLik: -1271133.69255723
#> Thu Sep 06 12:58:00 2018 .... Completed iteration: 9 | logLik: -1271131.24555386
#> Thu Sep 06 12:58:00 2018 .... Determining if any cell clusters should be split.
#> Thu Sep 06 12:58:00 2018 .... Cluster 1 was reassigned and cluster 3 was split in two.
#> Thu Sep 06 12:58:00 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:58:00 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:58:00 2018 .... Completed iteration: 10 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:00 2018 .... Completed iteration: 11 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:00 2018 .... Completed iteration: 12 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:00 2018 .... Completed iteration: 13 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:00 2018 .... Completed iteration: 14 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:00 2018 .... Completed iteration: 15 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:00 2018 .... Completed iteration: 16 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:00 2018 .... Completed iteration: 17 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:00 2018 .... Completed iteration: 18 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:00 2018 .... Completed iteration: 19 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:00 2018 .... Determining if any cell clusters should be split.
#> Thu Sep 06 12:58:01 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:58:01 2018 .... Completed iteration: 20 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:01 2018 .... Completed iteration: 21 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:01 2018 .... Determining if any cell clusters should be split.
#> Thu Sep 06 12:58:01 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:58:01 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:58:01 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:58:01 2018 .... Completed iteration: 22 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:01 2018 .. Finished chain 1 with seed 12345
#> Thu Sep 06 12:58:01 2018 .. Initializing chain 2 with 'random' (seed=12346)
#> Thu Sep 06 12:58:01 2018 .... Completed iteration: 1 | logLik: -1296147.64459921
#> Thu Sep 06 12:58:01 2018 .... Completed iteration: 2 | logLik: -1273614.61367925
#> Thu Sep 06 12:58:01 2018 .... Completed iteration: 3 | logLik: -1271640.01823375
#> Thu Sep 06 12:58:01 2018 .... Completed iteration: 4 | logLik: -1271150.85741638
#> Thu Sep 06 12:58:01 2018 .... Completed iteration: 5 | logLik: -1270826.33540845
#> Thu Sep 06 12:58:01 2018 .... Completed iteration: 6 | logLik: -1268220.93677393
#> Thu Sep 06 12:58:01 2018 .... Completed iteration: 7 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:01 2018 .... Completed iteration: 8 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:01 2018 .... Completed iteration: 9 | logLik: -1265981.10028326
#> Thu Sep 06 12:58:01 2018 .... Determining if any cell clusters should be split.
#> Thu Sep 06 12:58:01 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:58:01 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:58:02 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 10 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 11 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 12 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 13 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 14 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 15 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 16 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:02 2018 .... Determining if any cell clusters should be split.
#> Thu Sep 06 12:58:02 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:58:02 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:58:02 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 17 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:02 2018 .. Finished chain 2 with seed 12346
#> Thu Sep 06 12:58:02 2018 .. Initializing chain 3 with 'random' (seed=12347)
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 1 | logLik: -1298276.1895605
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 2 | logLik: -1270053.97340606
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 3 | logLik: -1266751.51933782
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 4 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 5 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 6 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 7 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 8 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:02 2018 .... Completed iteration: 9 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:02 2018 .... Determining if any cell clusters should be split.
#> Thu Sep 06 12:58:02 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:58:02 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:58:03 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:58:03 2018 .... Completed iteration: 10 | logLik: -1265977.42998371
#> Thu Sep 06 12:58:03 2018 .... Completed iteration: 11 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:03 2018 .... Completed iteration: 12 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:03 2018 .... Completed iteration: 13 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:03 2018 .... Determining if any cell clusters should be split.
#> Thu Sep 06 12:58:03 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:58:03 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:58:03 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:58:03 2018 .... Completed iteration: 14 | logLik: -1265977.81160925
#> Thu Sep 06 12:58:03 2018 .. Finished chain 3 with seed 12347
#> --------------------------------------------------------------------
#> Completed Celda_CG. Total time: 3.8418 secs
#> --------------------------------------------------------------------
celda.tsne <- celdaTsne(counts = sim.res$counts, celda.mod = celda_cg) plotDimReduceState(dim1 = celda.tsne[,1], dim2 = celda.tsne[,2], counts = sim.res$counts, celda.mod = celda_cg, modules = c("L1","L2"))