flip overlapPointDT[i] / [,j] default: ids = TRUE → FALSE#374
Merged
Conversation
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>
jiajic
added a commit
to jiajic/GiottoClass
that referenced
this pull request
May 26, 2026
Cascade giotto-suite#374 (flip overlapPointDT ids default TRUE → FALSE) up to gsource.
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.
This was referenced May 27, 2026
Merged
jiajic
added a commit
that referenced
this pull request
Jun 1, 2026
overlapPointDT-class.Rd reflects PR #374 (ids = TRUE → FALSE default, updated examples). spatRelate.Rd reflects PR #376 (trimmed cross-package GiottoDisk context). Source roxygen was updated in those PRs but the generated .Rd files were not refreshed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Flip the default for `[` on `overlapPointDT` single-axis indexing from `ids = TRUE` (return integer indices) to `ids = FALSE` (return subset object). The selection-query form is still available via `ovlp[i, ids = TRUE]`.
Why
The previous default was the unusual case. Most callers want subset semantics:
Audit found zero external callers (Giotto, GiottoDisk, GiottoVisuals) relying on the old default — only the test in `test-aggregate.R` and the documented examples.
What changes
Side benefit
Standalone polygon loads (e.g. `GiottoData::loadSubObjectMini`) that carry legacy `SpatVector` overlaps now subset cleanly. `SpatVector[i]` returns a subset `SpatVector`, which is what `.subset_overlaps_poly` now expects. No migration hook required.
Test plan
🤖 Generated with Claude Code