fix: obsm data frame have correct indices for python - #44
Open
ilan-gold wants to merge 2 commits into
Open
Conversation
This was referenced Aug 25, 2026
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.
There is no specific language around this in our spec (which I just realized) and I did the work already, so I'm going to open this PR but previously,
dataframes from this packages (on-disk) in{obs,var}mlacked the matching index which would violate our python data structure's internal check: https://github.com/scverse/anndata/blob/01350d5fbea14a257edf3570608f2f0fdcd3883a/src/anndata/_core/aligned_mapping.py#L357-L366. Thus they were rendered unreadable. I need to investigate the history of this now, though. This is the source of the bug I mentioned in scverse/rustar-aligner#1 (comment).UPDATE: This behavior is traced back to scverse/anndata@f47db8c#diff-742a387bf5be7fca99f2c79f893d0a62ca524b6579a14bf5d9db8612ed1ca739R31-R46 with no explanation, so now it's just a matter of how bad breaking that behavior is.