deprecate: expression_matrix_class across createGiottoObject + read helpers#372
Merged
jiajic merged 1 commit intoMay 26, 2026
Conversation
…elpers The expression_matrix_class param was already deprecated in createExprObj but still had real defaults on createGiottoObject, readExprData, and readExprMatrix. createGiottoObject forwarded the default into readExprData → .read_expression_data → createExprObj, which then matched is_present() and emitted the deprecation warning on every default createGiottoObject call — generating thousands of warnings across the test suite. Three changes, same pattern as createExprObj: - Default changed from a real character vector to lifecycle::deprecated() - is_present() check emits the deprecation warning when the param is actually supplied by the caller - Param is no longer forwarded to downstream helpers .read_expression_data (internal) drops the param entirely — no external callers, no longer plumbed through. The DelayedArray / dbSparseMatrix branches in readExprMatrix are removed since the param can no longer influence return type; the function now always returns the default sparse class. Acceptable behavior change for a deprecated parameter — surfaced via the warning. Test suite: 967 / 0 (was previously generating ~3000 deprecation warnings on every run from the cascade; warning count down to 1449). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| cores = determine_cores(), | ||
| raw_exprs = NULL, | ||
| expression_matrix_class = c("dgCMatrix", "DelayedArray"), | ||
| expression_matrix_class = deprecated(), |
| images <- c(images, largeImages) | ||
| } | ||
|
|
||
| if (is_present(expression_matrix_class)) { |
| "DelayedArray", | ||
| "dbSparseMatrix" | ||
| )) { | ||
| expression_matrix_class = deprecated()) { |
|
|
||
| if (is_present(expression_matrix_class)) { | ||
| warning(sprintf( | ||
| "[createGiottoObject] param '%s' is deprecated", |
| if (identical(expression_matrix_class, "dbSparseMatrix")) { | ||
| stop("File conversion to dbMatrix is not yet supported") | ||
| if (is_present(expression_matrix_class)) { | ||
| warning(sprintf( |
2 tasks
jiajic
added a commit
to jiajic/GiottoClass
that referenced
this pull request
May 26, 2026
Cascade giotto-suite#372 (expression_matrix_class deprecation) + giotto-suite#374 (flip overlapPointDT[i] / [,j] default ids = TRUE → FALSE) into gmulti.
Merged
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
`expression_matrix_class` was already deprecated in `createExprObj` but still had real defaults on `createGiottoObject`, `readExprData`, and `readExprMatrix`. `createGiottoObject` forwarded its default through `readExprData` → `.read_expression_data` → `createExprObj`, where `is_present()` matched and emitted the deprecation warning on every default `createGiottoObject` call. The test suite was generating ~3000 of these warnings per run as a result.
What changes
Same pattern as the existing `createExprObj` deprecation, applied to the rest of the chain:
Tests
Full suite: 967 / 0. Warning count dropped from ~4700 to 1449 with this cleanup.
🤖 Generated with Claude Code