v1.37.2 - fix subsetting of grouped data frame#109
Merged
Conversation
The `grpid` column in `pa@grped_df` is an integer factor. The comparison `pa@grped_df$grpid==as.numeric(grp_idx)` fails when `grp_idx` is 100000 because `as.numeric` returns type `double`. `pa@grped_df$grpid == 100000` returns `FALSE` for all items even if 100000 is present. `pa@grped_df$grpid == 100000L` returns `TRUE` for items that are 100000.
…ata package (too large for Bioconductor) (#108) * Use zenodo reference to library spectra * Update CI/CD * troubleshoot vignette build issue * Troubleshooting cache on github workflows * Troubleshooting cache for github workflows * more troubleshooting GH workflow cache
Tomnl
approved these changes
Feb 20, 2026
Member
Tomnl
left a comment
There was a problem hiding this comment.
Good spot @oss6.
I’ve not previously worked with a dataset containing ≥100,000 grouped features, so it makes sense that this didn’t surface before.
The updated handling of grp_idx looks much safer. Hopefully, if the same unit tests are passing after the fix, and given that the issue caused the analysis to fail in the scenario you identified, this suggests the issue is likely confined to that specific case.
Please go ahead and squash and merge once all CI checks are green.
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.
The
grpidcolumn inpa@grped_dfis an integer factor. The comparisonpa@grped_df$grpid==as.numeric(grp_idx)fails whengrp_idxis 100000 becauseas.numericreturns typedouble.pa@grped_df$grpid == 100000returnsFALSEfor all items even if 100000 is present.pa@grped_df$grpid == 100000LreturnsTRUEfor items that are 100000.