Overview
The gDRtestData
package is intended to store and
generate example data that can be used through the gDR
suite.
Use Cases
Synthetic data generation
Since gDR is a computational suite for drug response data from any experiment, a synthetic dataset is also needed for testing and exploration.
The basis of this package are two functions to generate the synthetic sets of cell lines and drugs.
cell_lines <- create_synthetic_cell_lines()
drugs <- create_synthetic_drugs()
These base objects can be extended with additional information.
- Replicates
cl_rep <- add_data_replicates(cell_lines)
head(cl_rep)
- Concentration
cl_conc <- add_concentration(cell_lines)
head(cl_conc)
Or the user can do both with one function:
df_layout <- prepareData(cell_lines, drugs)
head(df_layout)
Additionally, the user may fill in the full response data with the day 0 part.
df_layout_small <- prepareData(cell_lines[seq_len(2), ], drugs[seq_len(4), ])
df_layout_small$Duration <- 72
df_layout_small$ReadoutValue <- 0
df_layout_small_with_Day0 <- add_day0_data(df_layout_small)
head(df_layout_small_with_Day0)
In a further step, the user may generate a set of synthetic results:
- Hill coefficient
hill <- generate_hill_coef(cell_lines, drugs)
- EC50 metric
ec50_met <- generate_ec50(cell_lines, drugs)
- E inf metric
einf_met <- generate_e_inf(cell_lines, drugs)
Or the user can create full response data with one function (for single-agent):
response_data <- prepareMergedData(cell_lines, drugs)
head(response_data)
SUMMARY
Step | Function | Output (data.table ) |
---|---|---|
0 | create_synthetic_cell_lines() | synthetic cell lines |
0 | create_synthetic_drugs() | synthetic drugs |
1 | prepareData() | cell lines and drug merged with replicates and concentration |
2 | prepareMergedData() | full response data for single-agent |
2 | prepareComboMergedData() | full response data for combo |
2 | prepareCodilutionData () | full response data for co-dilution |
Synthetic object of gDR data model
The gDR data model is built on the MultiAssayExperiments (MAE)
structure. A detailed description of the gDR data model can be found in
gDRcore
package vignette.
In inst/testdata
the user may find a set of
qs
files that are examples of gDR data model for different
data types. In the file synthetic_list.yml
one can find a
list of these datasets. Currently available are:
#> * combo_2dose_nonoise,
#> * combo_2dose_nonoise2,
#> * combo_2dose_nonoise3,
#> * combo_codilution_small,
#> * combo_codilution,
#> * combo_matrix_small,
#> * combo_matrix,
#> * combo_triple,
#> * medium,
#> * small_no_noise,
#> * small,
#> * wLigand .
The script generate_example_data.R
which shows how to
generate and process above-mentioned datasets is in
inst/scripts
dir. All key functions can be found in package
gDRcore
in script generate_wrappers.R
.
SessionInfo
sessionInfo()
#> R version 4.3.0 (2023-04-21)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 22.04.3 LTS
#>
#> Matrix products: default
#> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> time zone: Etc/UTC
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] gDRtestData_1.5.1 BiocStyle_2.30.0
#>
#> loaded via a namespace (and not attached):
#> [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45
#> [4] rlang_1.1.3 xfun_0.42 stringi_1.8.3
#> [7] purrr_1.0.2 textshaping_0.3.7 data.table_1.16.2
#> [10] jsonlite_1.8.8 glue_1.7.0 backports_1.5.0
#> [13] htmltools_0.5.7 ragg_1.2.7 sass_0.4.8
#> [16] rmarkdown_2.25 evaluate_0.23 jquerylib_0.1.4
#> [19] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4
#> [22] memoise_2.0.1 bookdown_0.37 BiocManager_1.30.22
#> [25] stringr_1.5.1 compiler_4.3.0 fs_1.6.3
#> [28] systemfonts_1.0.5 digest_0.6.34 R6_2.5.1
#> [31] magrittr_2.0.3 checkmate_2.3.2 bslib_0.6.1
#> [34] tools_4.3.0 pkgdown_2.0.7 cachem_1.0.8
#> [37] desc_1.4.3