Skip to content

chore: cascade dev → gsource (expression_matrix_class deprecation + overlap ids flip)#373

Merged
jiajic merged 15 commits into
giotto-suite:gsourcefrom
jiajic:gsource
May 31, 2026
Merged

chore: cascade dev → gsource (expression_matrix_class deprecation + overlap ids flip)#373
jiajic merged 15 commits into
giotto-suite:gsourcefrom
jiajic:gsource

Conversation

@jiajic

@jiajic jiajic commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Cascade the recent dev changes up to gsource:

Test plan

josschavezf and others added 11 commits May 22, 2026 16:37
…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>
…ression-matrix-class

deprecate: expression_matrix_class across createGiottoObject + read helpers
- pulls `expression_matrix_class ` deprecation and a docs change
Default subset on a single axis now returns an overlapPointDT subset
object, matching overlapIntensityDT (which has no ids param and always
subsets) and SpatVector (legacy storage). The selection-query form
(integer indices) is still available via `ovlp[i, ids = TRUE]`.

Why: callers consistently want subset semantics — `.subset_overlaps_poly`,
`.subset_overlaps_feat`, and the broken-then-reverted-then-broken
"ids = FALSE" workarounds all converge on subset. The default
returning indices was the unusual case (only documented + tested, no
external callers found). Flipping it removes a footgun.

Internal callers updated:
- `.subset_overlaps_poly`: `[i, ids = FALSE]` → `[i]`
- `.subset_overlaps_feat`: `[, i, ids = FALSE]` → `[, i]`

Selection-query callers explicit:
- test-aggregate.R: now uses `ovlp[i, ids = TRUE]` for the indices form,
  plus new test asserting `ovlp[i]` default returns overlapPointDT.

Docs in classes-overlaps.R updated to reflect the new default.

Side benefit: standalone polygon loads (e.g. GiottoData::loadSubObjectMini)
that carry legacy SpatVector @overlaps now subset cleanly — SpatVector's
[i] already returns a subset SpatVector, so .subset_overlaps_poly works
without needing the ids workaround that SpatVector's [ doesn't support.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
flip overlapPointDT[i] / [,j] default: ids = TRUE → FALSE
Cascade giotto-suite#374 (flip overlapPointDT ids default TRUE → FALSE) up to gsource.
@jiajic jiajic changed the title chore: cascade dev → gsource (expression_matrix_class deprecation) chore: cascade dev → gsource (expression_matrix_class deprecation + overlap ids flip) May 26, 2026
jiajic and others added 4 commits May 29, 2026 13:22
New S4 generic for the "filter form" complement to relate() — returns x
narrowed by a spatial predicate rather than a relation matrix. The eager
method on (giottoSpatial, giottoSpatial) wraps relate() + subset; the on-
disk lazy form lives in GiottoDisk via methods on parquetGeomBase.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Five tests covering the eager filter-form contract: returns same class
as x, narrowed to features satisfying the predicate; default relation
is intersects; predicate choice affects narrowing; empty result is a
zero-row giottoSpatial.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jiajic jiajic merged commit 80f227f into giotto-suite:gsource May 31, 2026
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.

2 participants