View source: R/scmet_simulate.R
scmet_simulate | R Documentation |
General function for simulating datasets with diverse proprties. This for instance include, adding covariates X that explain differences in mean methylation levels. Or also defining the trend for the mean - overdispersion relationship.
scmet_simulate(
N_feat = 100,
N_cells = 50,
N_cpgs = 15,
L = 4,
X = NULL,
w_mu = c(-0.5, -1.5),
s_mu = 1,
w_gamma = NULL,
s_gamma = 0.3,
rbf_c = 1,
cells_range = c(0.4, 0.8),
cpgs_range = c(0.4, 0.8)
)
N_feat |
Total number of features (genomics regions). |
N_cells |
Maximum number of cells. |
N_cpgs |
Maximum number of CpGs per cell and feature. |
L |
Total number of radial basis functions (RBFs) to fit the mean-overdispersion trend. For L = 1, this reduces to a model that does not correct for the mean-overdispersion relationship. |
X |
Covariates which might explain variability in mean (methylation). If X = NULL, a 2-dim matrix will be generated, first column containing intercept term (all values = 1), and second colunn random generated covariates. |
w_mu |
Regression coefficients for covariates X. Should match number of columns of X. |
s_mu |
Standard deviation for mean parameter |
w_gamma |
Regression coefficients of the basis functions. Should match the value of L. If NULL, random coefficients will be generated. |
s_gamma |
Standard deviation of dispersion parameter |
rbf_c |
Scale parameter for empirically computing the variance of the RBFs. |
cells_range |
Range (betwen 0 and 1) to randomly (sub)sample the number of cells per feature. |
cpgs_range |
Range (betwen 0 and 1) to randomly (sub)sample the number of CpGs per cell and feature. |
A simulated dataset and additional information for reproducibility purposes.
sim <- scmet_simulate(N_feat = 150, N_cells = 50, N_cpgs = 15, L = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.