Generate simulated count data with batch effects for npeaks
mzrtsim(
ncomp = 100,
fc = NULL,
ncond = 2,
ncpeaks = 0.1,
nbatch = 3,
nbpeaks = 0.1,
npercond = 10,
nperbatch = c(8, 5, 7),
batchtype = "mb",
rtsim = TRUE,
db = NULL,
seed = 42
)
compound numbers to be selected, default 100
fold change of compounds with the same length of compounds numbers, default NULL
Number of conditions to simulate
percentage of compounds influenced by conditions
Number of batches to simulate
percentage of peaks influenced by batchs
Number of samples per condition to simulate
Number of samples per batch to simulate
type of batch. 'm' means monotonic, 'b' means block, 'r' means random error, 'mb' means mixed mode of monotonic and block, default 'mb'
logical, simulate retention time or not
compound database with MS1 data. e.g. hmdbcms or monams1
Random seed for reproducibility
list with rtmz data matrix, row index of peaks influenced by conditions, row index of peaks influenced by batchs, column index of conditions, column of batchs, raw condition matrix, raw batch matrix, peak mean across the samples, peak rsd across the samples
the numbers of batch columns should be the same with the condition columns.
data(hmdbcms)
sim <- mzrtsim(db=hmdbcms)