theislab / scvelo

RNA Velocity generalized through dynamical modeling
https://scvelo.org
BSD 3-Clause "New" or "Revised" License
408 stars 103 forks source link

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

Open jwalewski opened 7 months ago

jwalewski commented 7 months ago

Changes

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

Bug fixes

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

https://github.com/theislab/scvelo/issues/1183