compute_posterior.default | R Documentation |
Compute posterior according to Gamma-Poisson model for matrices and sparse matrices.
## Default S3 method:
compute_posterior(
input_obj,
case_control_variable,
covariates,
esvd_res,
library_size_variable,
nuisance_vec,
alpha_max = 1000,
bool_adjust_covariates = F,
bool_covariates_as_library = T,
bool_library_includes_interept = T,
bool_return_components = F,
bool_stabilize_underdispersion = T,
library_min = 0.1,
nuisance_lower_quantile = 0.01,
pseudocount = 0,
...
)
input_obj |
Dataset (either |
case_control_variable |
A string of the column name of |
covariates |
|
esvd_res |
Output of |
library_size_variable |
A string of the variable name (which must be in |
nuisance_vec |
Vector of non-negative numerics of length |
alpha_max |
Maximum value of numerator when computing posterior, default is |
bool_adjust_covariates |
Boolean to adjust the numerator in the posterior by the donor covariates, default is |
bool_covariates_as_library |
Boolean to include the donor covariates effects in the adjusted library size, default is |
bool_library_includes_interept |
Boolean if the intercept term from the eSVD matrix factorization should be included in the calculation for the covariate-adjusted library size, default is |
bool_return_components |
Boolean to return the numerator and denominator of the posterior terms as well (which will themselves by matrices that are cell-by-gene matrices), default is |
bool_stabilize_underdispersion |
Boolean to stabilize the over-dispersion parameter, specifically to rescale all the over-dispersions the global mean over-disperion is less than 1, default is |
library_min |
All covariate-adjusted library size smaller than this value are set to this value, default is 0.1. |
nuisance_lower_quantile |
All the nuisance values that are smaller than this quantile are set to this quantile. |
pseudocount |
The additional count that is added to the count matrix, default is 0. |
... |
Additional parameters. |
A list
of elements posterior_mean_mat
and posterior_var_mat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.