Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update _anndata.py - Clarify a bug & Add Subsetting Functionality #1182

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jwalewski
Copy link

@jwalewski jwalewski commented Feb 5, 2024

Changes

The one change I wish to make relates to the error handling present in an edge case to do with merging:

  • Currently, if one merges and there are no matching observations and there is no id_length given to clean the observation names, a traceback is triggered that says id_length is referenced before assignment. Since this isn't very informative of the real issue (that no id_length value was given and that there were no matching indices) I am proposing a minor change where the error is raised with a more descriptive message.

Bug fixes

  • None other than the change.

New

Throughout my time using scvelo I really wished that it was possible to directly subset based on observations being equal to a specific value (as compared to taking entire variables), so I wrote a subset_by_value function for my own work. I think it is helpful enough to be included in the repository as a whole.

Let me know if there is any other functionality that should be included in it and/or what tests should be run before it is merged into the main branch.

Linked issue

#1183

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