Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #133 +/- ##
==========================================
+ Coverage 90.97% 91.49% +0.52%
==========================================
Files 11 10 -1
Lines 1639 1587 -52
==========================================
- Hits 1491 1452 -39
+ Misses 148 135 -13
🚀 New features to boost your workflow:
|
62b142a to
da9e2d3
Compare
|
@ilia-kats On the subject of an hdf5 blindly clearing a store, do you think that is a bug? I noticed something similar but the person on that PR scverse/anndata#2366 (review) didn't reply. If so, I think we should just restrict to subgroups. |
|
At least for groups, it definitely makes sense to clear them. For example, the user might have deleted elements of I'm not sure what a good solution is. I think generally, the current behavior makes sense, |
|
But the store is only cleared if you write to |
|
When writing to a subkey of |
Can't you skip the EDIT: Ok I think I see, when you do |
|
I'm not sure if you mean what I think you mean, but I tried |
|
Would it make sense to provide a flag to turn this behavior off? I am not sure that solves anything since it seems like you want everything except |
|
I think in terms of amount of code cleaning the store by hand wouldn't save much. Using the accessors sounds like a nice idea, but it's not something that works currently, right? So as far as currently released AnnData versions go, I don't think I can clean this up further. |
MuData/AnnData read from Zarr cannot be backed, so there is no need for custom handling
for more information, see https://pre-commit.ci
Switch to AnnData's public API as much as possible.
This now uses
read_dispatchedto enable custom logic when reading individual modalities. Unfortunately, the same approach was not possible for writing: If we're writing a backed file, only the metadata should be written, while theXshould remain intact. Unfortunately, callingwrite_dispatchedon the entire AnnData object first clears the HDF5 group completely, so theXis gone. Therefore, we still need to write the individual modalities by hand.