Simulates spatially correlated CpG methylation whose signal is partly driven by the captured confounders, then forms each negative control as a linear prediction from the methylation sites ("CpG-predicted expression"). The controls therefore carry confounder information only to the extent the methylation does, mediated through a realistic spatial methylation layer.
Arguments
- U
n x kconfounder matrix.- covariates
Covariate data frame (unused; kept for the NC contract).
- params
List with
n_features, and optionallycoverage(confounder->methylation strength, default 0.7),captured(confounder indices, default all),n_cpg(methylation sites, default 60),rho(AR(1) spatial correlation across sites, default 0.6),MMCpG(methylation-confounding multiplier, default 1),MMCon(default 1), andnoise_cor(ap x pcorrelation matrix for correlated idiosyncratic noise, orNULLfor independent noise).
