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.
# primary test data
td1 <- get_test_data()
summary(td1)
## Length Class Mode
## 1 gdr_test_data S4
td1
## class: gdr_test_data
## slots: manifest_path result_path template_path ref_m_df ref_r1_r2 ref_r1 ref_t1_t2 ref_t1
# test data in Tecan format
td2 <- get_test_Tecan_data()
summary(td2)
## 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
# test data in D300 format
td3 <- get_test_D300_data()
summary(td3)
## Length Class Mode
## f_96w 6 -none- list
## f_384w 6 -none- list
# test data obtained from EnVision
td4 <- get_test_EnVision_data()
summary(td4)
## 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.
ml <- load_manifest(manifest_path(td1))
summary(ml)
## Length Class Mode
## data 4 data.table list
## headers 27 -none- list
t_df <- load_templates(template_path(td1))
summary(t_df)
## 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
r_df <- suppressMessages(load_results(result_path(td1)))
summary(r_df)
## 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.
res <- validate_gdr_input(c(manifest_path(td1), template_path(td1), result_path(td1)))
res$verdict
## [1] "PASS"
res$findings[, c("check", "severity", "detail")]
## 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:
convert_LEVEL5_prism_to_gDR_input("path_to_file")
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:
convert_LEVEL6_prism_to_gDR_input("prism_data_path", "cell_line_data_path", "treatment_data_path")
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.
sessionInfo()
## R version 4.6.1 (2026-06-24)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.5 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.24-bioc/R/lib/libRblas.so
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0 LAPACK version 3.12.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_GB LC_COLLATE=C
## [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: America/New_York
## 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
##
## 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] rmarkdown_2.32 coop_0.6-3 xfun_0.62
## [25] cachem_1.1.0 jsonlite_2.0.0 SnowballC_0.7.1
## [28] later_1.4.8 DelayedArray_0.39.8 BiocParallel_1.47.0
## [31] parallel_4.6.1 sets_1.0-25 cluster_2.1.8.3
## [34] R6_2.6.1 bslib_0.12.0 stringi_1.8.9
## [37] RColorBrewer_1.1-3 limma_3.99.3 boot_1.3-32
## [40] cellranger_1.1.0 brio_1.1.5 jquerylib_0.1.4
## [43] bookdown_0.48 assertthat_0.2.1 Rcpp_1.1.2
## [46] knitr_1.52 R.utils_2.13.0 downloader_0.4.1
## [49] httpuv_1.6.17 Matrix_1.7-6 igraph_2.3.4
## [52] tidyselect_1.2.1 dichromat_2.0-1 abind_1.4-8
## [55] yaml_2.3.12 stringfish_0.19.2 gplots_3.3.0
## [58] codetools_0.2-20 lattice_0.23-1 tibble_3.3.1
## [61] plyr_1.8.9 withr_3.0.3 shiny_1.14.0
## [64] BumpyMatrix_1.21.0 S7_0.2.2 evaluate_1.0.5
## [67] lambda.r_1.2.6 futile.logger_1.4.9 RcppParallel_6.2.1
## [70] bench_1.1.4 BiocManager_1.30.27 pillar_1.11.1
## [73] lsa_0.73.4 KernSmooth_2.23-27 checkmate_2.3.4
## [76] DT_0.34.0 shinyjs_2.1.1 piano_2.29.0
## [79] ggplot2_4.0.3 scales_1.4.0 gtools_3.9.5
## [82] xtable_1.8-8 marray_1.91.0 qs2_0.3.1
## [85] glue_1.8.1 slam_0.1-56 tools_4.6.1
## [88] data.table_1.18.6.1 gDRutils_1.11.21 fgsea_1.39.2
## [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