View source: R/simulate_data.R
simulate_data | R Documentation |
Simulate LC-MS/MS data or any other spectra from sdf db files.
simulate_data(
db_ids = NULL,
compound_names = NULL,
xls_file_name = NULL,
valid_sdf_file = NULL,
nbatch = 3,
nsamps_per_batch = c(100, 200, 300),
QC_freq = c(25, 25, 25),
multiplyer = 100,
seed = 123,
sim_sd = NULL,
m_eff = 1.25,
b_eff_pos = 1.25,
b_eff_neg = 0.75,
save_rds = FALSE,
rds_name = NULL
)
db_ids |
|
compound_names |
|
xls_file_name |
|
valid_sdf_file |
|
nbatch |
|
nsamps_per_batch |
|
QC_freq |
|
multiplyer |
|
seed |
|
sim_sd |
|
m_eff |
|
b_eff_pos |
|
b_eff_neg |
|
save_rds |
|
rds_name |
|
A nested tibble. The first column is the db id of the compounds simulated. The second column is the simulated matrix. The following four columns represent four batch simulation scenarios, which are:
1) t1_sim_mat - a monotonic (up/down effect) by batch.
2) t2_sim_mat - a batch to batch block effect.
3) t3_sim_mat - random, no systematic change.
4) t4_sim_mat - monotonic and batch to batch block effect.
sim1 = simulate_data(compound_names = "tricin",
xls_file_name = system.file("extdata", "Index.xls", package = "pseudoDrift"),
valid_sdf_file = system.file("extdata", "valid-test.sdf", package = "pseudoDrift"))
sim2 = simulate_data(db_ids = c("FIO00738", "FIO00739","FIO00740"),
xls_file_name = system.file("extdata", "Index.xls", package = "pseudoDrift"),
valid_sdf_file = system.file("extdata", "valid-test.sdf", package = "pseudoDrift"))
## Providing name or compound db IDs gives the same result
identical(sim1,sim2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.