Models the imputed gene expression values as a mixture of gaussian distributions. For a two-state model, estimates the probability that a given cell is in the 'on' or 'off' state for any gene. Followed by a greedy k-means step where cells are allowed to flip states based on the overall structure of the data (see Manuscript for details)
FitGeneK(object, gene, do.k = 2, num.iter = 1, do.plot = FALSE,
genes.use = NULL, start.pct = NULL)
Seurat object
Gene to fit
Number of modes for the mixture model (default is 2)
Number of 'greedy k-means' iterations (default is 1)
Plot mixture model results
Genes to use in the greedy k-means step (See manuscript for details)
Initial estimates of the percentage of cells in the 'on' state (usually estimated from the in situ map)
A Seurat object, where the posterior of each cell being in the 'on' or 'off' state for each gene is stored in object@spatial@mix.probs