Skip to content

chore: migrate from qs to qs2 package (GDR-3351)#182

Merged
gladkia merged 8 commits into
mainfrom
GDR-3351
Apr 19, 2026
Merged

chore: migrate from qs to qs2 package (GDR-3351)#182
gladkia merged 8 commits into
mainfrom
GDR-3351

Conversation

@gladkia
Copy link
Copy Markdown
Collaborator

@gladkia gladkia commented Apr 13, 2026

Description

What changed?

Related JIRA issue: GDR-3351

Replaced all usage of the archived qs package with qs2:

  • qs::qread()qs2::qs_read()
  • qs::qsave()qs2::qs_save()
  • File extensions updated from .qs to .qs2
  • Dependency in DESCRIPTION updated accordingly
  • Tests and vignettes updated to reflect the new API

Why was it changed?

The qs package was archived on CRAN on January 17, 2026 and will not be included in Bioconductor 3.23.
The qs2 package is its official successor with an incompatible binary format.

Checklist for sustainable code base

  • I added tests for any code changed/added
  • I added documentation for any code changed/added
  • I made sure naming of any new functions is self-explanatory and consistent

Logistic checklist

  • Package version bumped
  • Changelog updated

@gladkia gladkia requested a review from a team as a code owner April 13, 2026 11:18
@gladkia gladkia requested review from darsoo and j-smola and removed request for a team April 13, 2026 11:18
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the package from qs to qs2, updating dependencies, file extensions, and function calls. Feedback suggests ensuring that qs2::qs_read receives a single file path in tests to avoid potential errors when multiple files match the search pattern.

Comment thread tests/testthat/test-merge_SE.R Outdated
Comment on lines +14 to +16
listSE4 <- c(listSE[1], ligand = qs2::qs_read(
list.files(system.file(package = "gDRtestData", "testdata"),
"Ligand", full.names = TRUE))[[1]])
"Ligand.*\\.qs2$", full.names = TRUE))[[1]])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The call to qs2::qs_read might fail if list.files returns more than one file path or an empty vector. While the pattern is more specific now, it's safer to ensure a single path is passed, similar to how indexing is used in lines 2 and 8.

listSE4 <- c(listSE[1], ligand = qs2::qs_read(
  list.files(system.file(package = "gDRtestData", "testdata"),
             "Ligand.*\\.qs2$", full.names = TRUE)[1])[[1]])

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

Copy link
Copy Markdown
Contributor

@j-smola j-smola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, update doc with devtools::document("./").

Additionally, please refactor example - instead of mae <- get_synthetic_data("finalMAE_combo_matrix_small.qs") use mae <- gDRutils::get_synthetic_data("combo_matrix_small")

There is a comment in body of convert_se_assay_to_custom_dt function with qs - maybe that also should be changed into qs2? Also description of output from process_batch function should be updated.

What with RUN Rscript -e 'BiocManager::install(c("BiocStyle", "qs"))' in DOCKERFILE?

gladkia added 2 commits April 13, 2026 16:09
- Dockerfile: update BiocManager install from qs to qs2
- convert_mae_se_assay_to_dt.R: update inline comments from qs to qs2
- utils.R: update process_batch @return/@details to reference .qs2 files;
  update get_synthetic_data @param description and all @examples to use
  gDRutils::get_synthetic_data("small") short-name form
Copy link
Copy Markdown
Contributor

@bczech bczech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please get rid of gDRutils:: namespacing within gDRutils package R/utils.R

Comment thread R/utils.R Outdated
#' @examples
#' get_synthetic_data("finalMAE_small.qs")
#' @examples
#' gDRutils::get_synthetic_data("small")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is gDRutils package so we don't need to namespace it

Suggested change
#' gDRutils::get_synthetic_data("small")
#' get_synthetic_data("small")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@gladkia
Copy link
Copy Markdown
Collaborator Author

gladkia commented Apr 16, 2026

Please, update doc with devtools::document("./").

Additionally, please refactor example - instead of mae <- get_synthetic_data("finalMAE_combo_matrix_small.qs") use mae <- gDRutils::get_synthetic_data("combo_matrix_small")

There is a comment in body of convert_se_assay_to_custom_dt function with qs - maybe that also should be changed into qs2? Also description of output from process_batch function should be updated.

What with RUN Rscript -e 'BiocManager::install(c("BiocStyle", "qs"))' in DOCKERFILE?

Done, including Dockerfile update.

Copy link
Copy Markdown
Contributor

@j-smola j-smola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refactor all example - instead of mae <- get_synthetic_data("finalMAE_combo_matrix_small.qs") use mae <- gDRutils::get_synthetic_data("combo_matrix_small")

Copy link
Copy Markdown
Contributor

@j-smola j-smola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, inspect carefully function description and change qs -> qs2.
Additionally, update doc with devtools::document("./").

@gladkia gladkia merged commit 0a643a5 into main Apr 19, 2026
3 of 4 checks passed
@gladkia gladkia deleted the GDR-3351 branch April 19, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants