Description Usage Arguments Value Author(s) See Also Examples
View source: R/melissa_gibbs.R
melissa_gibbs
implements the Gibbs sampling algorithm
for performing clustering of single cells based on their DNA methylation
profiles, where the observation model is the Bernoulli distributed Probit
Regression likelihood. NOTE: that Gibbs sampling is really slow and we
recommend using the VB implementation: melissa
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
X |
A list of length I, where I are the total number of cells. Each element of the list contains another list of length N, where N is the total number of genomic regions. Each element of the inner list is an L x 2 matrix of observations, where 1st column contains the locations and the 2nd column contains the methylation level of the corresponding CpGs. |
K |
Integer denoting the number of clusters K. |
pi_k |
Vector of length K, denoting the mixing proportions. |
w |
A N x M x K array, where each column contains the basis function coefficients for the corresponding cluster. |
basis |
A 'basis' object. E.g. see create_rbf_object from BPRMeth package |
w_0_mean |
The prior mean hyperparameter for w |
w_0_cov |
The prior covariance hyperparameter for w |
dir_a |
The Dirichlet concentration parameter, prior over pi_k |
lambda |
The complexity penalty coefficient for penalized regression. |
gibbs_nsim |
Argument giving the number of simulations of the Gibbs sampler. |
gibbs_burn_in |
Argument giving the burn in period of the Gibbs sampler. |
inner_gibbs |
Logical, indicating if we should perform Gibbs sampling to sample from the augmented BPR model. |
gibbs_inner_nsim |
Number of inner Gibbs simulations. |
is_parallel |
Logical, indicating if code should be run in parallel. |
no_cores |
Number of cores to be used, default is max_no_cores - 1. |
is_verbose |
Logical, print results during EM iterations |
An object of class melissa_gibbs
.
C.A.Kapourani C.A.Kapourani@ed.ac.uk
melissa
, create_melissa_data_obj
,
partition_dataset
, filter_regions
1 2 3 4 5 6 7 8 9 10 11 12 | # Example of running Melissa Gibbs on synthetic data
# Create RBF basis object with 4 RBFs
basis_obj <- BPRMeth::create_rbf_object(M = 4)
set.seed(15)
# Run Melissa Gibbs
melissa_obj <- melissa_gibbs(X = melissa_synth_dt$met, K = 2, basis = basis_obj,
gibbs_nsim = 10, gibbs_burn_in = 5, is_parallel = FALSE, is_verbose = FALSE)
# Extract mixing proportions
print(melissa_obj$pi_k)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.