Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7b000e1
fix: replace nrow/ncol with NROW/NCOL to satisfy gDRstyle linting rules
bczech May 14, 2026
ca86d9d
fix: resolve gDRstyle linting violations
bczech May 18, 2026
daed703
chore: bump version and update NEWS.md
bczech May 18, 2026
a62b56e
docs: update NEWS.md entry wording
bczech May 20, 2026
3e085d9
fix: restore paste0 for multi-arg concatenation with collapse
bczech May 20, 2026
5736a36
fix: restore logic changes incorrectly introduced by lint fixes
bczech May 20, 2026
e63ff7c
fix: restore paste0 in merge_SE.R to avoid unwanted spaces
bczech May 26, 2026
a953639
fix: complete nrow/ncol to NROW/NCOL replacement
bczech May 27, 2026
f8c0783
chore: trigger CI
bczech May 27, 2026
8e65c04
fix: resolve remaining gDRstyle linting violations
bczech May 27, 2026
64dc26e
fix: add missing terminal newlines
bczech May 27, 2026
5ac5942
chore: update date to 2026-05-27
bczech May 27, 2026
2eb9c0f
fix: use infinitive verbs in NEWS.md entries
bczech May 27, 2026
19c6824
fix: use infinitive verbs in NEWS.md entries
bczech May 27, 2026
59c4efe
docs: regenerate documentation
bczech May 27, 2026
80bf7c9
ci: retrigger build
bczech May 27, 2026
2bc6b2b
ci: retrigger build
bczech May 28, 2026
d4587f1
ci: retrigger build
bczech May 28, 2026
97265ad
ci: retrigger build
bczech May 28, 2026
41aff0f
ci: trigger build
bczech May 28, 2026
455a8ff
ci: retrigger build
bczech May 28, 2026
eef74c9
ci: retrigger build
bczech May 28, 2026
c700baa
ci: retrigger build
bczech May 28, 2026
b4eba3f
ci: retrigger build
bczech May 28, 2026
9108c31
ci: trigger build
bczech May 28, 2026
a17e160
ci: retrigger build
bczech May 28, 2026
6d258f5
ci: retrigger build
bczech May 28, 2026
ca3691a
ci: retrigger build
bczech May 28, 2026
852a36a
ci: trigger build
bczech May 28, 2026
bf7dc1a
ci: trigger build
bczech May 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ vignettes/*.pdf
# support for build via github.com with access_token defined
.github_access_token.txt
docs
.serena/
4 changes: 2 additions & 2 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.11.2
Date: 2026-05-05
Version: 1.11.3
Date: 2026-05-27
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
29 changes: 16 additions & 13 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## gDRutils 1.11.3 - 2026-05-27
* apply updated gDRstyle rules

## gDRutils 1.11.2 - 2026-05-05
* update author email address

Expand Down Expand Up @@ -127,7 +130,7 @@
* make split_SE_components working correctly for sa assay data, modified with `avearge_biological_duplicates`

## gDRutils 1.5.4 - 2024-12-09
* minor improvement in the logic of `average_biological_replicates` (new blacklisted column)
* improve in the logic of `average_biological_replicates` (new blacklisted column)

## gDRutils 1.5.3 - 2024-12-02
* refactor `set_unique_*` functions
Expand Down Expand Up @@ -252,7 +255,7 @@
* release Bioc 3.18

## gDRutils 1.0.0 - 2023-10-24
* prerelease Bioc 3.18
* prepare prerelease for Bioc 3.18

## gDRutils 0.99.34 - 2023-10-18
* adjust NEWS to Bioc format
Expand All @@ -267,7 +270,7 @@
* add `wide_structure` param to `convert_mae_assay_to_dt`

## gDRutils 0.99.30 - 2023-09-08
* updated `experimentalist` description in schema
* update `experimentalist` description in schema

## gDRutils 0.99.29 - 2023-09-05
* add `Replicate` as a new identifier
Expand All @@ -285,7 +288,7 @@
* add assert for missing rownames

## gDRutils 0.99.24 - 2023-06-22
* replaced RDS with qs
* replace RDS with qs

## gDRutils 0.99.23 - 2023-06-20
* fix check in R 4.3
Expand All @@ -301,7 +304,7 @@
* switch from `aggregate` to `data.table`

## gDRutils 0.99.19 - 2023-06-06
* replaced reshape2 functions by functions from data.table
* replace reshape2 functions by functions from data.table

## gDRutils 0.99.18 - 2023-05-22
* format the vignette with BiocStyle
Expand Down Expand Up @@ -404,7 +407,7 @@
* add co-dilution to single-agent group

## gDRutils 0.1.3.8 - 2022-11-30
* bugfix in validate_SE
* fix validate_SE

## gDRutils 0.1.3.7 - 2022-10-18
* add update_env_idfs_from_mae function
Expand Down Expand Up @@ -453,7 +456,7 @@
* set r2 value to NA for invalid and 0 for constant fits

## gDRutils 0.1.0.42 - 2022-04-08
* added identifier descriptions
* add identifier descriptions

## gDRutils 0.1.0.41 - 2022-04-08
* fix wrong order of elements in rownames in SE
Expand Down Expand Up @@ -612,10 +615,10 @@
* add `prettify_flat_metrics` function

## gDRutils 0.0.0.41 - 2021-04-29
* bugfix flattening data.tables
* fix flattening data.tables

## gDRutils 0.0.0.40 - 2021-04-29
* bugfix data.table merge in `convert_se_assay_ref_to_dt`
* fix data.table merge in `convert_se_assay_ref_to_dt`

## gDRutils 0.0.0.39 - 2021-04-27
* add support for flattening data.tables
Expand Down Expand Up @@ -653,7 +656,7 @@
* remove positional naming dependence on assay_to_dt for - merge_metrics = TRUE argument

## gDRutils 0.0.0.28 - 2021-03-16
* minor refactor to assay_to_dt
* refactor to assay_to_dt
* deprecated support for assay_to_dt- include_controls = TRUE argument - not backwards compatible

## gDRutils 0.0.0.27 - 2021-03-09
Expand All @@ -671,7 +674,7 @@
* clean-up assay_to_dt

## gDRutils 0.0.0.23 - 2021-02-04
* added linter
* add linter

## gDRutils 0.0.0.22 - 2021-02-03
* move assay_to_dt from gDR to gDRutils
Expand Down Expand Up @@ -712,7 +715,7 @@
* update namespaces

## gDRutils 0.0.0.10 - 2020-10-05
* minor refactor
* refactor

## gDRutils 0.0.0.9 - 2020-09-14
* add small fixes for assays with empty DataFrame
Expand All @@ -727,4 +730,4 @@
* import pipes from magrittr

## gDRutils 0.0.0.4 - 2020-06-10
* including the masked field to be able to remove the masked data from averages
* including the masked field to be able to remove the masked data from averages
24 changes: 12 additions & 12 deletions R/assay_names.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ ASSAY_INFO_TBL <- data.table::data.table(
#' will return single string instead of named vector with single element
#' useful when function is expected to return single element/assay only
#' @keywords assay_names
#'
#'
#' @return charvec
#'
#' @examples
#'
#' @examples
#' get_env_assay_names()
#'
#' @author Arkadiusz Gładki \email{arkadiusz.gladki@@contractors.roche.com}
Expand Down Expand Up @@ -66,7 +66,7 @@ get_env_assay_names <-
df <- df[df[[eval(filter)]] %in% v_filters[[filter]], ]
}

if ((nrow(df)) == 0) {
if ((NROW(df)) == 0) {
v_filters_str <-
paste(names(v_filters),
v_filters,
Expand All @@ -93,9 +93,9 @@ get_env_assay_names <-
#'
#' @return charvec
#'
#' @examples
#' @examples
#' get_assay_names()
#'
#'
#' @export
get_assay_names <- function(se = NULL, ...) {
if (!is.null(se) &&
Expand All @@ -116,9 +116,9 @@ get_assay_names <- function(se = NULL, ...) {
#' @keywords assay_names
#' @return charvec of combo assay names.
#' @export
#' @examples
#' @examples
#' get_combo_assay_names()
#'
#'
#' @author Arkadiusz Gładki \email{arkadiusz.gladki@@contractors.roche.com}
#'
get_combo_assay_names <- function(se = NULL, ...) {
Expand All @@ -134,7 +134,7 @@ get_combo_assay_names <- function(se = NULL, ...) {
#' @return charvec
#' @export
#'
#' @examples
#' @examples
#' get_combo_base_assay_names()
#' @author Arkadiusz Gładki \email{arkadiusz.gladki@@contractors.roche.com}
#'
Expand All @@ -151,10 +151,10 @@ get_combo_base_assay_names <- function(se = NULL, ...) {
#' @return charvec
#'
#' @export
#'
#' @examples
#'
#' @examples
#' get_combo_score_assay_names()
#'
#'
#' @author Arkadiusz Gładki \email{arkadiusz.gladki@@contractors.roche.com}
#'
get_combo_score_assay_names <- function(se = NULL, ...) {
Expand Down
52 changes: 26 additions & 26 deletions R/combo.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
#' @param se \code{SummarizedExperiment} object with dose-response data
#' @param c_assays charvec of combo assays to be used
#' @param normalization_type charvec of normalization_types expected in the data
#' @param prettify boolean flag indicating whether or not to prettify the colnames of the returned data
#' @param prettify boolean flag indicating whether or not to prettify the colnames of the returned data
#' @keywords combination_data
#'
#'
#' @author Arkadiusz Gładki \email{arkadiusz.gladki@@contractors.roche.com}
#'
#' @return list of data.table(s) with combo data
#'
#' @examples
#' @examples
#' mae <- get_synthetic_data("finalMAE_combo_matrix_small.qs2")
#' convert_combo_data_to_dt(mae[[1]])
#'
Expand Down Expand Up @@ -38,7 +38,7 @@ convert_combo_data_to_dt <-
}
dt
})

# TODO: discuss what should be returned: assay_name or maybe assay_type?
names(my_l) <- as.character(c_assays)
my_l
Expand All @@ -60,10 +60,10 @@ DATA_COMBO_INFO_TBL <- data.table::data.table(
#' @return charvec
#'
#' @export
#'
#' @examples
#'
#' @examples
#' get_combo_score_assay_names()
#'
#'
get_combo_score_field_names <- function() {
dt <- DATA_COMBO_INFO_TBL[type == "scores", c("name", "pname"), with = FALSE]
stats::setNames(dt$pname, dt$name)
Expand All @@ -75,10 +75,10 @@ get_combo_score_field_names <- function() {
#' @return charvec
#'
#' @export
#'
#' @examples
#'
#' @examples
#' get_combo_excess_field_names()
#'
#'
get_combo_excess_field_names <- function() {
dt <- DATA_COMBO_INFO_TBL[type == "excess", c("name", "pname"), with = FALSE]
stats::setNames(dt$pname, dt$name)
Expand All @@ -93,10 +93,10 @@ get_combo_excess_field_names <- function() {
#' @return charvec
#'
#' @export
#'
#' @examples
#'
#' @examples
#' convert_combo_field_to_assay("hsa_score")
#'
#'
convert_combo_field_to_assay <- function(field) {
checkmate::assert_string(field)
DATA_COMBO_INFO_TBL[name == field, ][["type"]]
Expand All @@ -111,26 +111,26 @@ convert_combo_field_to_assay <- function(field) {
#' @details
#' \code{drug_1} is diluted along the rows as the y-axis and
#' \code{drug_2} is diluted along the columns and will be the x-axis.
#'
#'
#' @keywords combination_data
#' @return list with axis grid positions
#'
#'
#' @examples
#' cl_name <- "cellline_BC"
#' drug1_name <- "drug_001"
#' drug2_name <- "drug_026"
#'
#'
#' se <- get_synthetic_data("combo_matrix_small")[["combination"]]
#' dt_average <- convert_se_assay_to_dt(se, "Averaged")[normalization_type == "GR"]
#'
#'
#' ls_axes <- define_matrix_grid_positions(
#' dt_average[["Concentration"]], dt_average[["Concentration_2"]])
#'
#'
#' @export
define_matrix_grid_positions <- function(conc1, conc2) {
checkmate::assert_numeric(conc1)
checkmate::assert_numeric(conc2)

.generate_gap_for_single_agent <- function(x) {
if (NROW(x) == 1) {
x
Expand All @@ -139,8 +139,8 @@ define_matrix_grid_positions <- function(conc1, conc2) {
} else {
x[2] - 0.5 # diff(log10(c(0, 10^(seq(-3, 1, 0.5))))) # nolint
}
}
}

conc_1 <- sort(unique(round_concentration(conc1)))
pos_y <- log10conc_1 <- log10(conc_1)
pos_y[1] <- .generate_gap_for_single_agent(log10conc_1)
Expand All @@ -149,7 +149,7 @@ define_matrix_grid_positions <- function(conc1, conc2) {
pos_y = pos_y,
marks_y = sprintf("%.2g", conc_1)
)

conc_2 <- sort(unique(round_concentration(conc2)))
pos_x <- log10conc_2 <- log10(conc_2)
pos_x[1] <- .generate_gap_for_single_agent(log10conc_2)
Expand All @@ -158,16 +158,16 @@ define_matrix_grid_positions <- function(conc1, conc2) {
pos_x = pos_x,
marks_x = sprintf("%.2g", conc_2)
)

list(axis_1 = axis_1, axis_2 = axis_2)
}

#' Round concentration to ndigit significant digits
#'
#' @param x value to be rounded.
#' @param ndigit number of significant digits (default = 4).
#'
#' @examples
#'
#' @examples
#' round_concentration(x = c(0.00175,0.00324,0.0091), ndigit = 1)
#'
#' @return rounded x
Expand All @@ -176,6 +176,6 @@ define_matrix_grid_positions <- function(conc1, conc2) {
round_concentration <- function(x, ndigit = 3) {
checkmate::assert_numeric(x)
checkmate::assert_integerish(ndigit)

round(10 ^ (round(log10(x), ndigit)), ndigit - 1 - floor(log10(x)))
}
Loading
Loading