Simulate label-free proteomics-like two-group data
simulateData.RdSimulates two-group quantitative omics data with controlled signal structure, including abundance-dependent variance, differential expression, sample correlation, global shifts, mean-SD dependence, and optional MNAR missingness.
Usage
simulateData(
nProteins = 10000,
nPerGroup = 20,
muMean = 18,
muSd = 1.2,
muClip = c(15, 25),
rhoWithin = 0.85,
rhoBetween = 0.55,
loadingSd = 0.25,
sigmaHi = 0.05,
sigmaLo = 0.4,
gammaSigma = 2.5,
propDE = 0.35,
logFCSd = 1,
logFCMean = 0,
heteroLogFC = TRUE,
fcHi = 0.55,
fcLo = 2.5,
gammaFC = 7,
sampleShiftSd = 0,
sampleShiftCap = 0.2,
sampleSdStrength = 0,
sampleSdRho = 0.8,
sampleSdCap = 0.35,
addMissing = TRUE,
targetMissing = 0.001,
kMnar = 1.2,
missingBySampleSd = 0.05,
seed = 9396
)Arguments
- nProteins
integer. Number of proteins or features to simulate. Default is10000.- nPerGroup
integer. Number of samples per group. Default is20.- muMean
numeric. Mean of the protein-wise abundance distribution on the log2 scale. Default is18.- muSd
numeric. Standard deviation of the protein-wise abundance distribution on the log2 scale. Default is1.2.- muClip
numericvector of length 2. Lower and upper bounds used to truncate simulated protein means. Default isc(15, 25).- rhoWithin
numeric. Within-group correlation target for the latent sample factor. Default is0.85.- rhoBetween
numeric. Between-group correlation target for the latent sample factor. Default is0.55.- loadingSd
numeric. Standard deviation of protein-specific loadings for the correlated latent factor. Default is0.25.- sigmaHi
numeric. Residual standard deviation at high abundance. Default is0.05.- sigmaLo
numeric. Residual standard deviation at low abundance. Default is0.4.- gammaSigma
numeric. Controls how strongly residual variance depends on abundance. Default is2.5.- propDE
numeric. Proportion of differentially expressed proteins. Default is0.35.- logFCSd
numeric. Standard deviation of differential expression log-fold changes. Default is1.- logFCMean
numeric. Mean of differential expression log-fold changes. Default is0.- heteroLogFC
logical. IfTRUE, the variance of log-fold changes depends on abundance. Default isTRUE.- fcHi
numeric. Lower multiplier for abundance-dependent logFC heterogeneity. Default is0.55.- fcLo
numeric. Upper multiplier for abundance-dependent logFC heterogeneity. Default is2.5.- gammaFC
numeric. Controls how strongly logFC variability depends on abundance. Default is7.- sampleShiftSd
numeric. Standard deviation of global sample shifts. Default is0.- sampleShiftCap
numeric. Maximum absolute value allowed for global sample shifts. Default is0.2.- sampleSdStrength
numeric. Strength of sample-specific mean-SD dependence. A value of0implies independence. Default is0.- sampleSdRho
numeric. Correlation between sample mean rank and sample-specific SD effect. Must lie between0and1. Default is0.8.- sampleSdCap
numeric. Maximum absolute value allowed for the log-multiplier controlling sample-specific SD effects. Default is0.35.- addMissing
logical. Should MNAR missing values be added? Default isTRUE.- targetMissing
numeric. Target overall proportion of missing Default is0.001.- kMnar
numeric. Strength of abundance dependence in the MNAR missing values. value mechanism. Default is1.2.- missingBySampleSd
numeric. Standard deviation of sample-specific missingness shifts. Default is0.05.- seed
integer. Random seed used for reproducibility. Default is9396.
Value
A list with the following elements:
- logData
Numeric matrix of simulated log2-scale data.
- rawData
Numeric matrix of simulated raw-scale data, obtained as
2^logData.- metadata
data.framecontaining sample names and group labels.
Details
The simulated data include several structured components:
Protein-wise mean abundance on the log2 scale.
A latent correlation structure inducing stronger within-group than between-group sample correlation.
Abundance-dependent heteroscedastic residual noise to create an MA-like wedge pattern.
Symmetric differential expression between the two groups.
Optional global sample shifts affecting overall intensity.
Optional sample-level mean-SD dependence.
Optional MNAR missingness driven by abundance and sample-specific effects.
The output is intended for testing normalization methods and associated scoring procedures under controlled simulation settings.