Skip to content

Replace S4Vectors::aggregate() calls to fix vignette build on Bioc devel - #124

Merged
kriemo merged 1 commit into
develfrom
fix-devel
Jul 7, 2026
Merged

kriemo merged 1 commit into
develfrom
fix-devel

Conversation

@kriemo

@kriemo kriemo commented Jul 7, 2026

Copy link
Copy Markdown
Member

Recent S4Vectors versions build the aggregate() evaluation environment from an object's mcols columns via makeFixedColumnEnv(), which requires a same-named accessor function for every column. Columns without one (e.g. rmsk's "swScore") abort with "object 'swScore' of mode 'function' was not found", breaking the vignette and any annot_from_gr()/annot_snps() call.

Replace all aggregate(x, by, expr, drop=FALSE) calls with explicit grouped reductions that do not rely on S4Vectors' non-standard evaluation:

  • add internal collapse_hits_annotations() helper for the annotation-string collapses in annot_from_gr() and annot_snps()
  • use extractList() + mean()/sum() for the numeric mispriming reductions in utils.R

Behavior is preserved, including empty groups collapsing to "" and annot_from_gr() converting those to NA. Bump version to 1.11.1.

Recent S4Vectors versions build the aggregate() evaluation environment
from an object's mcols columns via makeFixedColumnEnv(), which requires a
same-named accessor function for every column. Columns without one (e.g.
rmsk's "swScore") abort with "object 'swScore' of mode 'function' was not
found", breaking the vignette and any annot_from_gr()/annot_snps() call.

Replace all aggregate(x, by, expr, drop=FALSE) calls with explicit grouped
reductions that do not rely on S4Vectors' non-standard evaluation:
- add internal collapse_hits_annotations() helper for the annotation-string
  collapses in annot_from_gr() and annot_snps()
- use extractList() + mean()/sum() for the numeric mispriming reductions
  in utils.R

Behavior is preserved, including empty groups collapsing to "" and
annot_from_gr() converting those to NA. Bump version to 1.11.1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kriemo
kriemo merged commit 21099f4 into devel Jul 7, 2026
2 checks passed
@kriemo
kriemo deleted the fix-devel branch July 7, 2026 14:35
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.

1 participant