The gDRimport package is a part of the gDR suite. It
helps to prepare raw drug response data for downstream processing. It
mainly contains helper functions for importing/loading/validating dose
response data provided in different file formats.
There are currently four test datasets that can be used to see what’s the expected input data for the gDRimport.
## Length Class Mode
## 1 gdr_test_data S4
## class: gdr_test_data
## slots: manifest_path result_path template_path ref_m_df ref_r1_r2 ref_r1 ref_t1_t2 ref_t1
## Length Class Mode
## m_file 1 -none- character
## r_files 1 -none- character
## t_files 1 -none- character
## ref_m_df 1 -none- character
## ref_r_df 1 -none- character
## ref_t_df 1 -none- character
## Length Class Mode
## f_96w 6 -none- list
## f_384w 6 -none- list
## Length Class Mode
## m_file 1 -none- character
## r_files 28 -none- character
## t_files 2 -none- character
## ref_l_path 1 -none- character
The load_data is the key function. It wraps
load_manifest, load_templates and
load_results functions and supports different file
formats.
## Length Class Mode
## data 4 data.table list
## headers 27 -none- list
## WellRow WellColumn Gnumber Concentration
## Length :768 Length :768 Length :768 Length :768
## N.unique : 16 N.unique : 24 N.unique : 3 N.unique : 10
## N.blank : 0 N.blank : 0 N.blank : 0 N.blank : 0
## Min.nchar: 1 Min.nchar: 1 Min.nchar: 6 Min.nchar: 1
## Max.nchar: 1 Max.nchar: 2 Max.nchar: 7 Max.nchar: 19
## NAs :128 NAs :448
## Gnumber_2 Concentration_2 Template
## Length :768 Length :768 Length :768
## N.unique : 2 N.unique : 2 N.unique : 2
## N.blank : 0 N.blank : 0 N.blank : 0
## Min.nchar: 6 Min.nchar: 1 Min.nchar: 23
## Max.nchar: 7 Max.nchar: 4 Max.nchar: 25
## NAs :448 NAs :448
## Barcode WellRow WellColumn ReadoutValue
## Length :4608 Length :4608 Min. : 1.00 Min. : 12627
## N.unique : 12 N.unique : 16 1st Qu.: 6.75 1st Qu.: 67906
## N.blank : 0 N.blank : 0 Median :12.50 Median : 141014
## Min.nchar: 10 Min.nchar: 1 Mean :12.50 Mean : 265403
## Max.nchar: 10 Max.nchar: 1 3rd Qu.:18.25 3rd Qu.: 325330
## Max. :24.00 Max. :2423054
## BackgroundValue
## Min. :332.0
## 1st Qu.:351.0
## Median :384.5
## Mean :454.3
## 3rd Qu.:570.0
## Max. :704.0
l_tbl <-
suppressMessages(
load_data(manifest_path(td1), template_path(td1), result_path(td1)))
summary(l_tbl)## Length Class Mode
## manifest 4 data.table list
## treatments 7 data.table list
## data 5 data.table list
validate_gdr_input checks a set of input files before
the import and reports every problem it finds at once. It runs
load_data, so a failure reported for load_data
is the error the import would raise, and it also flags problems the
loaders let through without an error: concentrations that are not
numbers, raw plates without a barcode, duplicated wells, plates missing
from the manifest or from the data, and Duration labels that do not fit
the readouts of the control wells. The input files are only read.
## [1] "PASS"
## check severity
## <char> <char>
## 1: manifest PASS
## 2: combo_degenerate INFO
## 3: load_data PASS
## 4: import_corrections INFO
## 5: duplicate_wells PASS
## 6: barcode_coverage PASS
## 7: plate_outliers INFO
## detail
## <char>
## 1: Manifest loaded (12 plate(s)).
## 2: Template(s) hold the second drug at a single dose, so the combination has no Drug 2 gradient: Template_7daytreated.xlsx
## 3: load_data() read 4608 readout(s) as EnVision.
## 4: load_data() changed the case of 320 untreated tag(s).
## 5: No barcode and well is read twice.
## 6: Every plate in the manifest has data, and the other way round.
## 7: Not checked: no group of 4 or more plates with the same Duration and cell line.
Each finding has a status_code that points to
get_exception_data() when the problem has one, and a
fix_tier: A for a mechanical fix,
B for a fix to confirm with whoever made the files,
C for a decision about the experiment.
PRISM, the Multiplexed cancer cell line screening platform, facilitates rapid screening of a broad spectrum of drugs across more than 900 human cancer cell line models, employing a high-throughput, multiplexed approach. Publicly available PRISM data can be downloaded from the DepMap website (DepMap).
The gDRimport package provides support for processing
PRISM data at two levels: LEVEL5 and LEVEL6.
LEVEL5 Data: This format encapsulates all information about
drugs, cell lines, and viability within a single file. To process LEVEL5
PRISM data, you can use the
convert_LEVEL5_prism_to_gDR_input() function. This function
not only transforms and cleans the data but also executes the gDR
pipeline for further analysis.
LEVEL6 Data: In LEVEL6, PRISM data is distributed across three separate files:
prism_data: containing collapsed log fold change data for viability assays. cell_line_data: providing information about cell lines. treatment_data: containing treatment data.
Processing LEVEL6 PRISM data can be accomplished using the
convert_LEVEL6_prism_to_gDR_input() function, which
requires paths to these three files as input arguments.
To process LEVEL5 PRISM data, you can use the following function:
Replace “path_to_file” with the actual path to your LEVEL5 PRISM data file. This function will handle the transformation, cleaning, and execution of the gDR pipeline automatically.
To process LEVEL6 PRISM data, you can use the following function:
Replace “prism_data_path”, “cell_line_data_path”, and “treatment_data_path” with the respective paths to your LEVEL6 PRISM data files.
The function installAllDeps assists in installing
package dependencies.
## R version 4.6.1 (2026-06-24)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 26.04.1 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.32.so; LAPACK version 3.12.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] stats4 stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] BiocStyle_2.41.0 MultiAssayExperiment_1.39.1
## [3] gDRimport_1.11.13 PharmacoGx_3.17.0
## [5] CoreGx_2.17.0 SummarizedExperiment_1.43.0
## [7] Biobase_2.73.2 GenomicRanges_1.65.4
## [9] Seqinfo_1.3.2 IRanges_2.47.5
## [11] S4Vectors_0.51.10 MatrixGenerics_1.25.0
## [13] matrixStats_1.5.0 BiocGenerics_0.59.12
## [15] generics_0.1.4 rmarkdown_2.32
##
## loaded via a namespace (and not attached):
## [1] bitops_1.1-0 formatR_1.14 readxl_1.6.0
## [4] testthat_3.3.2 rlang_1.3.0 magrittr_2.0.5
## [7] shinydashboard_0.7.3 rio_1.3.1 otel_0.2.0
## [10] compiler_4.6.1 vctrs_0.7.3 reshape2_1.4.5
## [13] relations_0.6-18 stringr_1.6.0 pkgconfig_2.0.3
## [16] crayon_1.5.3 fastmap_1.2.0 backports_1.5.1
## [19] XVector_0.53.0 caTools_1.18.4 promises_1.5.0
## [22] coop_0.6-3 xfun_0.62 cachem_1.1.0
## [25] jsonlite_2.0.0 SnowballC_0.7.1 later_1.4.8
## [28] DelayedArray_0.39.8 BiocParallel_1.47.0 parallel_4.6.1
## [31] sets_1.0-25 cluster_2.1.8.3 R6_2.6.1
## [34] bslib_0.12.0 stringi_1.8.9 RColorBrewer_1.1-3
## [37] limma_3.99.3 boot_1.3-32 cellranger_1.1.0
## [40] brio_1.1.5 jquerylib_0.1.4 assertthat_0.2.1
## [43] Rcpp_1.1.2 knitr_1.52 R.utils_2.13.0
## [46] downloader_0.4.1 httpuv_1.6.17 Matrix_1.7-6
## [49] igraph_2.3.4 tidyselect_1.2.1 abind_1.4-8
## [52] yaml_2.3.12 stringfish_0.19.2 gplots_3.3.0
## [55] codetools_0.2-20 plyr_1.8.9 lattice_0.23-1
## [58] tibble_3.3.1 withr_3.0.3 shiny_1.14.0
## [61] BumpyMatrix_1.21.0 S7_0.2.2 evaluate_1.0.5
## [64] lambda.r_1.2.6 futile.logger_1.4.9 RcppParallel_6.2.1
## [67] bench_1.1.4 BiocManager_1.30.27 pillar_1.11.1
## [70] lsa_0.73.4 KernSmooth_2.23-27 checkmate_2.3.4
## [73] DT_0.34.0 shinyjs_2.1.1 piano_2.29.0
## [76] ggplot2_4.0.3 scales_1.4.0 gtools_3.9.5
## [79] xtable_1.8-8 marray_1.91.0 qs2_0.3.1
## [82] glue_1.8.1 slam_0.1-56 maketools_1.3.2
## [85] tools_4.6.1 sys_3.4.3 data.table_1.18.6.1
## [88] gDRutils_1.11.21 fgsea_1.39.2 buildtools_1.0.0
## [91] visNetwork_2.1.4 fastmatch_1.1-8 cowplot_1.2.0
## [94] grid_4.6.1 cli_3.6.6 futile.options_1.0.1
## [97] S4Arrays_1.13.2 rematch_2.0.0 dplyr_1.2.1
## [100] gtable_0.3.6 R.methodsS3_1.8.2 sass_0.4.10
## [103] digest_0.6.39 SparseArray_1.13.4 htmlwidgets_1.6.4
## [106] farver_2.1.2 R.oo_1.27.1 htmltools_0.5.9
## [109] lifecycle_1.0.5 statmod_1.5.2 mime_0.13