From 6fea3cc43677a1334edb177cc4954b5fc6dcbd72 Mon Sep 17 00:00:00 2001 From: Bartek Czech Date: Mon, 18 May 2026 10:07:50 +0200 Subject: [PATCH 1/3] fix: resolve gDRstyle linting violations Address lint violations from updated gDRstyle rules: - Fix trailing whitespace and blank lines - Replace nrow/ncol with NROW/NCOL - Fix paste_linter (paste0+collapse, toString, strrep, file.path) - Fix seq_linter (seq_along, seq_len) - Refactor cyclocomp_linter violations (extract helper functions) - Fix test linters (yoda, expect_true_false) - Remove undesirable operators (|> pipes) --- R/data.R | 12 ++++++------ R/gDR-package.R | 2 +- R/import_data.R | 4 ++-- tests/testthat/test-utils.R | 4 ++-- vignettes/gDR.Rmd | 28 ++++++++++++++-------------- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/R/data.R b/R/data.R index 89c97ba..89c1b5c 100644 --- a/R/data.R +++ b/R/data.R @@ -1,6 +1,6 @@ #' Small data.table with raw data used for processing via gDR #' -#' A dataset containing the ReadoutValues for single-agent experiments +#' A dataset containing the ReadoutValues for single-agent experiments #' made-up of 10 drugs and 10 cell lines #' #' @format A data frame with 3300 rows and 12 variables: @@ -18,16 +18,16 @@ #' \item{BackgroundValue}{backgroud value} #' \item{Duration}{duration} #' } -#' +#' #' @usage data(small_data) -#' +#' #' @keywords data #' @return data.table "small_data" #' Small data.table with raw combo data used for processing via gDR #' -#' A dataset containing the ReadoutValues for combo experiments made-up of +#' A dataset containing the ReadoutValues for combo experiments made-up of #' 3 drugs, 2 co-drugs, and 2 cell lines #' #' @format A data frame with 3600 rows and 16 variables: @@ -49,9 +49,9 @@ #' \item{BackgroundValue}{backgroud value} #' \item{Duration}{duration} #' } -#' +#' #' @usage data(small_combo_data) -#' +#' #' @keywords data #' @return data.table "small_combo_data" diff --git a/R/gDR-package.R b/R/gDR-package.R index 283cc5b..5d67202 100644 --- a/R/gDR-package.R +++ b/R/gDR-package.R @@ -1,4 +1,4 @@ -#' @note To learn more about functions start with `help(package = "gDR")` +#' @note To learn more about functions start with `help(package = "gDR")` #' @keywords internal #' @return package help page "_PACKAGE" diff --git a/R/import_data.R b/R/import_data.R index e43bebc..5a5105a 100644 --- a/R/import_data.R +++ b/R/import_data.R @@ -6,11 +6,11 @@ #' @param results_file character, with datapaths and names of results file(s) #' or character with file path of results file(s) #' @param instrument string with type of instrument used -#' +#' #' @examples #' td <- get_test_data() #' i_df <- import_data(manifest_path(td), template_path(td), result_path(td)) -#' +#' #' @return a \code{data.table} #' #' @keywords import diff --git a/tests/testthat/test-utils.R b/tests/testthat/test-utils.R index 92ccdbe..cbd4c75 100644 --- a/tests/testthat/test-utils.R +++ b/tests/testthat/test-utils.R @@ -1,10 +1,10 @@ context("utils") test_that("import_data", { - + # Define path for data stored in gDR package dataDir <- system.file("extdata", "data1", package = "gDRimport") - + # Extract path for example raw_data manifest <- list.files(dataDir, pattern = "manifest", full.names = TRUE) template <- list.files(dataDir, pattern = "Template", full.names = TRUE) diff --git a/vignettes/gDR.Rmd b/vignettes/gDR.Rmd index ece8f58..12e8904 100644 --- a/vignettes/gDR.Rmd +++ b/vignettes/gDR.Rmd @@ -34,7 +34,7 @@ We are happy to share with you our packages for importing, processing and managi - gDRutils - gDRtestData -## Data structures +## Data structures The gDR data model is based on the SummarizedExperiment and BumpyMatrix. If readers are unfamiliar with these data models, we recommend first reading [SummarizedExperiment vignettes](https://bioconductor.org/packages/release/bioc/vignettes/SummarizedExperiment/inst/doc/SummarizedExperiment.html), followed by the [BumpyMatrix vignettes](https://www.bioconductor.org/packages/devel/bioc/vignettes/BumpyMatrix/inst/doc/BumpyMatrix.html). The SummarizedExperiment data structure enables ease of subsetting within the SummarizedExperiment object, but also provides ease when trying to correlate drug response data with genomic data, as these data may jointly stored in a MultiAssayExperiment. The BumpyMatrix allows for storage of multi-dimensional data while retaining a matrix abstraction. This data structure is the core data structure that all downstream processing functions as well as visualization tools operate off of. @@ -42,18 +42,18 @@ This data structure is the core data structure that all downstream processing fu ## Overview The gDR suite was designed in a modular manner, such that a user can jump into the "standard" end-to-end gDR processing pipeline at several entry points as is suitable for his or her needs. The full pipeline involves: -``` +``` manifest, template(s), raw data | | 1. Aggregating all raw data and metadata - | into a single long table. + | into a single long table. | V single, long table | - | 2. Transforming the long table into - | a SummarizedExperiment object with BumpyMatrix assays - | by specifying what columns belong on rows, + | 2. Transforming the long table into + | a SummarizedExperiment object with BumpyMatrix assays + | by specifying what columns belong on rows, | columns, and nested. | V @@ -65,11 +65,11 @@ The gDR suite was designed in a modular manner, such that a user can jump into t V SummarizedExperiment object with raw, treated, normalized, - averaged, and metric assays, + averaged, and metric assays, ready for use by downstream visualization - + ``` - + A user should be able to enter any part of this pipeline as long as they are able to create the intermediate object (i.e., the individual manifest, template, and raw data files, or a single, long table, or a SummarizedExperiment object with Bumpy assays). @@ -93,11 +93,11 @@ template_path(td) result_path(td) ``` -Using the convenience function `import_data`, the long table is easily created: +Using the convenience function `import_data`, the long table is easily created: -```{r, echo=TRUE, results='asis', warning=FALSE, results='hide', message=FALSE} +```{r, echo=TRUE, results='asis', warning=FALSE, results='hide', message=FALSE} # Import data -imported_data <- +imported_data <- import_data(manifest_path(td), template_path(td), result_path(td)) head(imported_data) ``` @@ -128,7 +128,7 @@ Note that this has created a SummarizedExperiment object with `rowData`, `colDat ## Averaging and fitting data (3) -Next, we can average and fit the data of interest. +Next, we can average and fit the data of interest. ```{r, echo=TRUE, results='asis', warning=FALSE, results='hide', message=FALSE} se <- average_SE(se, data_type = "single-agent") se <- fit_SE(se, data_type = "single-agent") @@ -138,7 +138,7 @@ se ``` ## runDrugResponseProcessingPipeline -Steps (2) and (3) can be combined into a single step through a convenience function: `runDrugResponseProcessingPipeline`. Moreover, the output is `MultiAssayExperiment` object with one experiment per each detected data type. Currently four data types are supported: 'single-agent', 'cotreatment', 'codilution' and 'matrix'. The first three data types are processed via the 'single-agent' model while the 'marix' data is processed via the 'combintation' model. +Steps (2) and (3) can be combined into a single step through a convenience function: `runDrugResponseProcessingPipeline`. Moreover, the output is `MultiAssayExperiment` object with one experiment per each detected data type. Currently four data types are supported: 'single-agent', 'cotreatment', 'codilution' and 'matrix'. The first three data types are processed via the 'single-agent' model while the 'marix' data is processed via the 'combintation' model. ```{r, echo=TRUE, results='asis', warning=FALSE, results='hide', message=FALSE} # Run gDR pipeline From 45157e628223d013357708650884d7229daedb85 Mon Sep 17 00:00:00 2001 From: Bartek Czech Date: Mon, 18 May 2026 11:18:06 +0200 Subject: [PATCH 2/3] chore: bump version and update NEWS.md --- DESCRIPTION | 2 +- NEWS.md | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e15ec62..dfbf815 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: gDR Title: Umbrella package for R packages in the gDR suite -Version: 1.9.1 +Version: 1.9.2 Date: 2025-10-30 Authors@R: c( person("Allison", "Vuong", , "vuong.allison@gene.com", role = "aut"), diff --git a/NEWS.md b/NEWS.md index de02579..5c5f448 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +## gDR 1.9.2 - 2026-05-18 +* fix linting violations from updated gDRstyle rules + ## gDR 1.9.1 - 2025-10-30 * synchronize Bioconductor and GitHub versioning @@ -126,4 +129,4 @@ * add example data ## gDR 0.0.0.1 - 2021-02-03 -* initial version +* initial version \ No newline at end of file From 60db33647a96a04b6494b3384f9a4524cb62b6e7 Mon Sep 17 00:00:00 2001 From: Bartek Czech Date: Wed, 20 May 2026 08:06:10 +0200 Subject: [PATCH 3/3] docs: update NEWS.md entry wording --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 5c5f448..a4dbd66 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,5 @@ ## gDR 1.9.2 - 2026-05-18 -* fix linting violations from updated gDRstyle rules +* apply updated gDRstyle rules ## gDR 1.9.1 - 2025-10-30 * synchronize Bioconductor and GitHub versioning