R/simulate_LFQ_data.R
sim_lfq_data_2Factor_config.Rd
Simulate data, protein, with config with 2 factros Treatment and Background
sim_lfq_data_2Factor_config(
Nprot = 10,
with_missing = TRUE,
weight_missing = 0.2,
PEPTIDE = FALSE,
seed = 1234,
TWO = TRUE
)
add missing values, default TRUE
seed for reproducibility, if NULL no seed is set.
Nprot number of proteins
x <- sim_lfq_data_2Factor_config(PEPTIDE= FALSE)
#> creating sampleName from fileName column
#> completing cases
dim(x$data)
#> [1] 160 9
stopifnot("data.frame" %in% class(x$data))
stopifnot("AnalysisConfiguration" %in% class(x$config))
x <- sim_lfq_data_2Factor_config(PEPTIDE = TRUE)
#> creating sampleName from fileName column
#> Warning: no nr_children column specified in the data, adding column nr_children and setting to 1.
#> completing cases
head(x$data)
#> # A tibble: 6 × 10
#> sample sampleName Treatment Background isotopeLabel protein_Id peptide_Id
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 A_V1 A_V1 A X light 0EfVhX~0087 ITLb4x1q
#> 2 A_V1 A_V1 A X light 0EfVhX~0087 ahQLlQY7
#> 3 A_V1 A_V1 A X light 0EfVhX~0087 dJkdz7so
#> 4 A_V1 A_V1 A X light 7cbcrd~5725 D5dQ4nKk
#> 5 A_V1 A_V1 A X light 9VUkAq~4703 eIC06D7g
#> 6 A_V1 A_V1 A X light BEJI92~5282 HBkZvdhT
#> # ℹ 3 more variables: abundance <dbl>, qValue <dbl>, nr_peptides <dbl>
x <- sim_lfq_data_2Factor_config(PEPTIDE = TRUE, TWO = FALSE)
#> creating sampleName from fileName column
#> Warning: no nr_children column specified in the data, adding column nr_children and setting to 1.
#> completing cases
x$data$Group |> table()
#>
#> A_X A_Z B_X B_Z
#> 112 112 112 112