Calculates the conditional probability of each cell belong to each cluster given all other cluster assignments

# S3 method for celda_G
clusterProbability(counts, celda.mod, log = FALSE, ...)

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

log

Logical. If FALSE, then the normalized conditional probabilities will be returned. If TRUE, then the unnormalized log probabilities will be returned. Default FALSE.

...

Additional parameters.

Value

A list containging a matrix for the conditional cell cluster probabilities.

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:39 2018 .. Initializing chain 1 with 'random' (seed=12345)
#> Thu Sep 06 12:56:39 2018 .... Completed iteration: 1 | logLik: -291426.665356919
#> Thu Sep 06 12:56:39 2018 .... Completed iteration: 2 | logLik: -286595.332370062
#> Thu Sep 06 12:56:39 2018 .... Completed iteration: 3 | logLik: -286579.864858824
#> Thu Sep 06 12:56:39 2018 .... Completed iteration: 4 | logLik: -286579.864858824
#> Thu Sep 06 12:56:39 2018 .... Completed iteration: 5 | logLik: -286579.864858824
#> Thu Sep 06 12:56:39 2018 .... Completed iteration: 6 | logLik: -286579.864858824
#> Thu Sep 06 12:56:39 2018 .... Completed iteration: 7 | logLik: -286579.864858824
#> Thu Sep 06 12:56:40 2018 .... Completed iteration: 8 | logLik: -286579.864858824
#> Thu Sep 06 12:56:40 2018 .... Completed iteration: 9 | logLik: -286579.864858824
#> Thu Sep 06 12:56:40 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:56:40 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:56:40 2018 .... Completed iteration: 10 | logLik: -286579.864858824
#> Thu Sep 06 12:56:40 2018 .... Completed iteration: 11 | logLik: -286579.864858824
#> Thu Sep 06 12:56:40 2018 .... Completed iteration: 12 | logLik: -286579.864858824
#> Thu Sep 06 12:56:40 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:56:41 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:56:41 2018 .... Completed iteration: 13 | logLik: -286579.864858824
#> Thu Sep 06 12:56:41 2018 .. Finished chain 1 with seed 12345
#> Thu Sep 06 12:56:41 2018 .. Initializing chain 2 with 'random' (seed=12346)
#> Thu Sep 06 12:56:41 2018 .... Completed iteration: 1 | logLik: -287718.041765169
#> Thu Sep 06 12:56:41 2018 .... Completed iteration: 2 | logLik: -286579.864858824
#> Thu Sep 06 12:56:41 2018 .... Completed iteration: 3 | logLik: -286579.864858824
#> Thu Sep 06 12:56:41 2018 .... Completed iteration: 4 | logLik: -286579.864858824
#> Thu Sep 06 12:56:41 2018 .... Completed iteration: 5 | logLik: -286579.864858824
#> Thu Sep 06 12:56:41 2018 .... Completed iteration: 6 | logLik: -286579.864858824
#> Thu Sep 06 12:56:41 2018 .... Completed iteration: 7 | logLik: -286579.864858824
#> Thu Sep 06 12:56:41 2018 .... Completed iteration: 8 | logLik: -286579.864858824
#> Thu Sep 06 12:56:41 2018 .... Completed iteration: 9 | logLik: -286579.864858824
#> Thu Sep 06 12:56:41 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:56:41 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:56:41 2018 .... Completed iteration: 10 | logLik: -286579.864858824
#> Thu Sep 06 12:56:41 2018 .... Completed iteration: 11 | logLik: -286579.864858824
#> Thu Sep 06 12:56:41 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:56:42 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:56:42 2018 .... Completed iteration: 12 | logLik: -286579.864858824
#> Thu Sep 06 12:56:42 2018 .. Finished chain 2 with seed 12346
#> Thu Sep 06 12:56:42 2018 .. Initializing chain 3 with 'random' (seed=12347)
#> Thu Sep 06 12:56:42 2018 .... Completed iteration: 1 | logLik: -290090.898941072
#> Thu Sep 06 12:56:42 2018 .... Completed iteration: 2 | logLik: -286579.864858824
#> Thu Sep 06 12:56:42 2018 .... Completed iteration: 3 | logLik: -286579.864858824
#> Thu Sep 06 12:56:42 2018 .... Completed iteration: 4 | logLik: -286579.864858824
#> Thu Sep 06 12:56:42 2018 .... Completed iteration: 5 | logLik: -286579.864858824
#> Thu Sep 06 12:56:42 2018 .... Completed iteration: 6 | logLik: -286579.864858824
#> Thu Sep 06 12:56:42 2018 .... Completed iteration: 7 | logLik: -286579.864858824
#> Thu Sep 06 12:56:42 2018 .... Completed iteration: 8 | logLik: -286579.864858824
#> Thu Sep 06 12:56:42 2018 .... Completed iteration: 9 | logLik: -286579.864858824
#> Thu Sep 06 12:56:42 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:56:42 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:56:42 2018 .... Completed iteration: 10 | logLik: -286579.864858824
#> Thu Sep 06 12:56:42 2018 .... Completed iteration: 11 | logLik: -286579.864858824
#> Thu Sep 06 12:56:42 2018 .... Determining if any gene clusters should be split.
#> Thu Sep 06 12:56:43 2018 .... No additional splitting was performed.
#> Thu Sep 06 12:56:43 2018 .... Completed iteration: 12 | logLik: -286579.864858824
#> Thu Sep 06 12:56:43 2018 .. Finished chain 3 with seed 12347
#> --------------------------------------------------------------------
#> Completed Celda_G. Total time: 3.538973 secs
#> --------------------------------------------------------------------
cluster.prob = clusterProbability(celda.sim$counts, celda.mod)