
Generation of bulkRNAseq-like data with optional correlation structure
rs_generate_bulk_rnaseq.Rd
Function generates synthetic bulkRNAseq data with heteroskedasticity (lowly
expressed genes show higher variance) and optional co-expression modules
planted on a latent factor. Alongside the counts it returns the ground truth
(module membership, hub genes, per-gene loadings and the latent factors), so
downstream methods can be scored against what was actually simulated.
Arguments
- synthetic_params
List. The synthetic data parameters, see
params_synthetic_bulk_rnaseq(). Expected elements arenum_samples,num_genes,module_sizes(integer vector, empty means no modules),generator(one ofc("hub_modular", "modular", "non_negative_factor", "non_gaussian_factor")),seed,mean_exp_gamma_shape,mean_exp_gamma_scale,disp_intercept,disp_slope,noise_std,factor_std,factor_shape,factor_scale,loading_mu,loading_sigmaandhub_percentile.
Value
List with the following elements
counts The matrix of simulated counts. Rows are genes, columns are samples.
module_membership Vector defining the module membership.
0is background,1..Kthe module identifier.module_hubs 1-indexed positions of the genes flagged as hubs. Empty for the
"modular"generator, which plants no hubs.loadings Per-gene loading on its module's latent factor.
0for background genes.module_factors The latent factor matrix. Rows are modules, columns are samples.