Skip to content
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: gDRutils
Type: Package
Title: A package with helper functions for processing drug response data
Version: 1.9.7
Date: 2026-04-14
Version: 1.9.8
Date: 2026-04-18
Authors@R: c(person("Bartosz", "Czech", role=c("aut"),
comment = c(ORCID = "0000-0002-9908-3007")),
person("Arkadiusz", "Gladki", role=c("cre", "aut"), email="gladki.arkadiusz@gmail.com",
Expand Down Expand Up @@ -38,7 +38,7 @@ Imports:
stats,
stringr,
SummarizedExperiment,
qs,
qs2,
utils
Suggests:
BiocManager,
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ARG GITHUB_TOKEN
RUN mkdir -p /mnt/vol
COPY rplatform/dependencies.yaml rplatform/.github_access_token.txt* /mnt/vol
RUN echo "$GITHUB_TOKEN" >> /mnt/vol/.github_access_token.txt
RUN Rscript -e 'BiocManager::install(c("BiocStyle", "qs"))'
RUN Rscript -e 'BiocManager::install(c("BiocStyle", "qs2"))'
RUN Rscript -e "gDRstyle::installAllDeps()"

#================= Check & build package
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## gDRutils 1.9.8 - 2026-04-18
* migrate from `qs` to `qs2` package (`qs::qread` → `qs2::qs_read`, `qs::qsave` → `qs2::qs_save`)
* update batch file extension from `.qs` to `.qs2`

## gDRutils 1.9.7 - 2026-04-14
* add support for metadata in `merge_MAE`

Expand Down
2 changes: 1 addition & 1 deletion R/combo.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @return list of data.table(s) with combo data
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_combo_matrix_small.qs")
#' mae <- get_synthetic_data("finalMAE_combo_matrix_small.qs2")
#' convert_combo_data_to_dt(mae[[1]])
#'
#' @export
Expand Down
6 changes: 3 additions & 3 deletions R/concatentate_SEs.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ has_nested_field <- function(asy, nested_field) {
#' @details Revert this operation using \code{promote_fields}.
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' se <- promote_fields(se, "ReadoutValue", 2)
#' demote_fields(se, "ReadoutValue")
Expand Down Expand Up @@ -96,7 +96,7 @@ demote_fields <- function(se, fields) {
#' @seealso demote_fields
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' se <- promote_fields(se, "ReadoutValue", 2)
#'
Expand Down Expand Up @@ -218,7 +218,7 @@ promote_fields <- function(se, fields, MARGIN = c(1, 2)) {
#' @return A \code{BumpyMatrix} object aggregated by \code{FUN}.
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' assay <- SummarizedExperiment::assay(se)
#' aggregate_assay(assay, FUN = mean, by = c("Barcode"))
Expand Down
10 changes: 5 additions & 5 deletions R/convert_mae_se_assay_to_dt.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#' @return data.table representation of the data in \code{assay_name}.
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' convert_se_assay_to_dt(se, "Metrics")
#'
Expand Down Expand Up @@ -230,7 +230,7 @@ convert_se_assay_to_dt <- function(se,
#' @seealso flatten convert_se_assay_to_dt
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' convert_mae_assay_to_dt(mae, "Metrics")
#'
#' @export
Expand Down Expand Up @@ -306,7 +306,7 @@ convert_mae_assay_to_dt <- function(mae,
#' @return data.table representation of the data in \code{assay_name} with added information from \code{colData}.
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' convert_se_assay_to_custom_dt(se, "Metrics")
#' convert_se_assay_to_custom_dt(se, "Metrics", output_table = "Metrics_raw")
Expand Down Expand Up @@ -349,8 +349,8 @@ convert_se_assay_to_custom_dt <- function(se,
}

if (output_table %in% c("Metrics", "Metrics_raw")) {
# SE*.qs files contain 'c50' column instead of the 'ec50' in the metrics
# this is a temporary fix that should be removed once data (qs files) is reprocessed
# SE*.qs2 files contain 'c50' column instead of the 'ec50' in the metrics
# this is a temporary fix that should be removed once data (qs2 files) is reprocessed
data.table::setnames(dt, "c50", "ec50", skip_absent = TRUE)

groups <- c("normalization_type", "fit_source")
Expand Down
8 changes: 4 additions & 4 deletions R/duplicates.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ has_dt_duplicated_rows <- function(dt, col_names = NULL) {
#'
#' @param dt data.table with assay data
#' @examples
#' sdata <- get_synthetic_data("finalMAE_small")
#' sdata <- get_synthetic_data("finalMAE_small.qs2")
#' smetrics_data <- convert_se_assay_to_dt(sdata[[1]], "Metrics")
#' get_assay_req_uniq_cols(smetrics_data)
#' @return charvec with columns required to have unique data
Expand Down Expand Up @@ -80,7 +80,7 @@ get_assay_req_uniq_cols <- function(dt) {
#' @return logical flag indicating if a dt contains duplicated rows or not
#' @keywords duplicates
#' @examples
#' sdata <- get_synthetic_data("finalMAE_small")
#' sdata <- get_synthetic_data("finalMAE_small.qs2")
#' smetrics_data <- convert_se_assay_to_dt(sdata[[1]], "Metrics")
#' has_assay_dt_duplicated_rows(smetrics_data)
#' @export
Expand Down Expand Up @@ -142,7 +142,7 @@ get_duplicated_rows <- function(x,
#' @param output string with the output format to be returned
#' @return integer vector or data.table with duplicated rows
#' @examples
#' sdata <- get_synthetic_data("finalMAE_small")
#' sdata <- get_synthetic_data("finalMAE_small.qs2")
#' smetrics_data <- convert_se_assay_to_dt(sdata[[1]], "Metrics")
#' get_assay_dt_duplicated_rows(smetrics_data, output = "data")
#' get_assay_dt_duplicated_rows(smetrics_data)
Expand All @@ -169,7 +169,7 @@ get_assay_dt_duplicated_rows <- function(dt, output = "index") {
#' @param msg_f function to be used to throw the message
#' @param preview_max_numb number of rows to preview if duplicates found
#' @examples
#' sdata <- get_synthetic_data("finalMAE_small")
#' sdata <- get_synthetic_data("finalMAE_small.qs2")
#' smetrics_data <- convert_se_assay_to_dt(sdata[[1]], "Metrics")
#' throw_msg_if_duplicates(smetrics_data, assay_name = "Metrics", msg_f = futile.logger::flog.info)
#' @return NULL
Expand Down
6 changes: 3 additions & 3 deletions R/experiment_validators.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ validate_dimnames <- function(obj, obj2, skip_empty = TRUE) {
#' @export
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' validate_se_assay_name(se, "RawTreated")
#'
Expand Down Expand Up @@ -71,7 +71,7 @@ validate_se_assay_name <- function(se, name) {
#' @export
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' validate_SE(se)
#'
Expand Down Expand Up @@ -142,7 +142,7 @@ validate_SE <- function(se,
#' @export
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' validate_MAE(mae)
#'
#' @author Bartosz Czech <bartosz.czech@@contractors.roche.com>
Expand Down
2 changes: 1 addition & 1 deletion R/fit_curves.R
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ predict_efficacy_from_conc <- function(c, x_inf, x_0, ec50, h) {
#' @return A single numeric value for the predicted 'smooth' response.
#'
#' @examples
#' mae <- gDRutils::get_synthetic_data("combo_matrix")
#' mae <- get_synthetic_data("combo_matrix")
#' se <- mae[[gDRutils::get_supported_experiments("combo")]]
#' dt_metrics <- gDRutils::convert_se_assay_to_dt(se[1, 1], "Metrics")[normalization_type == "RV"]
#' predict_smooth_from_combo(conc_1 = 1.2, conc_2 = 9.8, metrics_merged = dt_metrics)
Expand Down
6 changes: 3 additions & 3 deletions R/helpers-tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @export
get_testdata <- function() {

mae <- get_synthetic_data("finalMAE_small")
mae <- get_synthetic_data("finalMAE_small.qs2")
raw_data <- convert_mae_assay_to_dt(mae, "Metrics")
drug_names <- unique(raw_data$DrugName)
cell_line_names <- unique(raw_data$CellLineName)
Expand Down Expand Up @@ -51,7 +51,7 @@ get_testdata <- function() {
#' @export
get_testdata_combo <- function() {

mae <- get_synthetic_data("finalMAE_combo_matrix")
mae <- get_synthetic_data("finalMAE_combo_matrix.qs2")
raw_data <- convert_mae_assay_to_dt(mae, "Metrics")
drug_names <- unique(raw_data$DrugName)
cell_line_names <- unique(raw_data$CellLineName)
Expand Down Expand Up @@ -91,7 +91,7 @@ get_testdata_combo <- function() {
#' @export
get_testdata_codilution <- function() {

mae <- get_synthetic_data("finalMAE_combo_codilution_small")
mae <- get_synthetic_data("finalMAE_combo_codilution_small.qs2")
raw_data <- convert_mae_assay_to_dt(mae, "Metrics")
drug_names <- unique(raw_data$DrugName)
cell_line_names <- unique(raw_data$CellLineName)
Expand Down
2 changes: 1 addition & 1 deletion R/json_convert.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' @return String representation of a JSON document.
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' convert_mae_to_json(mae)
#' convert_mae_to_json(mae, with_experiments = FALSE)
#'
Expand Down
2 changes: 1 addition & 1 deletion R/json_validate.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ validate_json <- function(json, schema_path) {
#' @return Boolean of whether or not mae is valid
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' validate_mae_with_schema(mae)
#'
#' @export
Expand Down
12 changes: 6 additions & 6 deletions R/merge_SE.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#' @keywords SE_operators
#'
#' @examples
#' mae1 <- get_synthetic_data("finalMAE_combo_2dose_nonoise")
#' mae2 <- get_synthetic_data("finalMAE_combo_2dose_nonoise")
#' mae1 <- get_synthetic_data("finalMAE_combo_2dose_nonoise.qs2")
#' mae2 <- get_synthetic_data("finalMAE_combo_2dose_nonoise.qs2")
#' merge_MAE(list(mae1 = mae1, mae2 = mae2), title = "Test", description = "Test MAE")
#'
#' @return Merged MultiAssayExperiment object.
Expand Down Expand Up @@ -149,7 +149,7 @@ merge_MAE <- function(MAElist,
#' @keywords SE_operators
#'
#' @examples
#' se1 <- get_synthetic_data("finalMAE_small")[[1]]
#' se1 <- get_synthetic_data("finalMAE_small.qs2")[[1]]
#' merge_SE(list(se1 = se1, se2 = se1))
#'
#' @return merged SummarizedExperiment object
Expand Down Expand Up @@ -248,7 +248,7 @@ merge_SE <- function(SElist,
#' @return BumpyMatrix or list with data.table + BumpyMatrix
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_combo_2dose_nonoise")
#' mae <- get_synthetic_data("finalMAE_combo_2dose_nonoise.qs2")
#'
#' listSE <- list(
#' combo1 = mae[[1]],
Expand Down Expand Up @@ -303,7 +303,7 @@ merge_assay <- function(SElist,
#' @return character vector of unique names of metadata
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' SElist <- list(
#' se,
Expand All @@ -329,7 +329,7 @@ identify_unique_se_metadata_fields <- function(SElist) {
#' @return list of merged metadata
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' listSE <- list(
#' se,
Expand Down
12 changes: 6 additions & 6 deletions R/se_metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ set_SE_experiment_raw_data <- function(se, value) {
#' @rdname SE_metadata
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small.qs")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' get_SE_fit_parameters(se)
#'
Expand All @@ -90,7 +90,7 @@ get_SE_fit_parameters <- function(se) {
#' @rdname SE_metadata
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small.qs")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' meta <- get_SE_processing_metadata(se)
#'
Expand All @@ -103,7 +103,7 @@ get_SE_processing_metadata <- function(se) {
#' @rdname SE_metadata
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small.qs")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' get_SE_experiment_raw_data(se)
#'
Expand All @@ -116,7 +116,7 @@ get_SE_experiment_raw_data <- function(se) {
#' @rdname SE_metadata
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small.qs")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' get_SE_experiment_metadata(se)
#'
Expand All @@ -142,7 +142,7 @@ get_SE_keys <- function(se, key_type = NULL) {
#' @rdname SE_metadata
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small.qs")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' get_SE_identifiers(se)
#'
Expand Down Expand Up @@ -175,7 +175,7 @@ get_SE_identifiers <- function(se, id_type = NULL, simplify = TRUE) {
#' @return named list with identifiers for each SE
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small.qs")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' get_MAE_identifiers(mae)
#'
#' @keywords SE_operators
Expand Down
12 changes: 6 additions & 6 deletions R/standardize_MAE.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @return mae a MultiAssayExperiment with default gDR identifiers
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small.qs")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' S4Vectors::metadata(mae[[1]])$identifiers$drug <- "druug"
#' standardize_mae(mae)
#'
Expand All @@ -32,7 +32,7 @@ standardize_mae <- function(mae, use_default = TRUE) {
#' @return se a SummarizedExperiment with default gDR identifiers
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small.qs")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' S4Vectors::metadata(se)$identifiers$drug <- "druug"
#' standardize_se(se)
Expand Down Expand Up @@ -142,7 +142,7 @@ standardize_se <- function(se, use_default = TRUE) {
#' @return a renamed DFrame object
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small.qs")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' rename_DFrame(SummarizedExperiment::rowData(mae[[1]]), c("Gnumber" = "Gnumber1"))
#'
#' @export
Expand All @@ -165,7 +165,7 @@ rename_DFrame <- function(df, mapping_vector) {
#' @return a renamed BumpyMatrix object
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small.qs")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' se <- mae[[1]]
#' assay <- SummarizedExperiment::assay(se)
#' rename_bumpy(assay, c("Concentration" = "conc"))
Expand Down Expand Up @@ -231,7 +231,7 @@ get_optional_rowdata_fields <- function(se) {
#' @return refined colData
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small.qs")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' refine_coldata(SummarizedExperiment::colData(mae[[1]]), mae[[1]])
#'
#' @export
Expand Down Expand Up @@ -263,7 +263,7 @@ refine_coldata <- function(cd, se, default_v = "Undefined") {
#' @return refined rowData
#'
#' @examples
#' mae <- get_synthetic_data("finalMAE_small.qs")
#' mae <- get_synthetic_data("finalMAE_small.qs2")
#' refine_rowdata(SummarizedExperiment::colData(mae[[1]]), mae[[1]])
#'
#' @export
Expand Down
Loading
Loading