do_impute: Sampling multiple copies of imputed values and cell factors...

Description Usage Arguments Value Author(s)

View source: R/do_impute.R

Description

do_impute get the posterior mean and variance for the imputed values and factors given the parameters, which can be returned from SIMPLE or SIMPLE_B.

Usage

1
2
3
do_impute(dat, Y, beta, lambda, sigma, mu, pi, pos_mean = NULL,
  pos_sd = NULL, celltype = NULL, mcmc = 10, burnin = 2,
  verbose = F, pg = 0.5, cutoff = 0.1)

Arguments

dat

scRNASeq data matrix. Each row is a gene, each column is a cell.

Y

Initial imputed data, output from SIMPLE_B or SIMPLE.

beta

Factor loadings, output from SIMPLE_B or SIMPLE.

lambda

Variances of factors for each cluster, output from SIMPLE_B or SIMPLE.

sigma

Variances of idiosyncratic noises for each cluster, output from SIMPLE_B or SIMPLE.

mu

Mean expression for each cluster, output from SIMPLE_B or SIMPLE.

pi

Probabilites of cells belong to each cluster, output from SIMPLE_B or SIMPLE.

pos_mean

Gene mean. If centerized each gene before estimating the parameters, provide the overall mean of gene expression removed from the data matrix, output from SIMPLE_B or SIMPLE. Default is NULL.

pos_sd

Gene standard deviation. If scaled each gene before estimating the parameters, provide the overall standard deviation of gene expression removed from the data matrix, output from SIMPLE_B or SIMPLE. Default is NULL. Default is NULL.

Value

do_impute returns a list of imputation results in the following order.

  1. loglikThe log-likelihood of the imputed gene expression at each iteration.

  2. imptA matrix contains the expectation of imputed expression.

  3. impt_varA matrix contains the variance of each imputed entry.

  4. EFPosterior means of factors

  5. varFPosterior covariance matrix of factors

  6. consensus_clusterScore for the clustering stability of each cell by multiple imputations.

Author(s)

Zhirui Hu, zhiruihu@g.harvard.edu

Songpeng Zu, songpengzu@g.harvard.edu


xyz111131/SIMPLEs documentation built on Jan. 8, 2020, 2:48 a.m.