Closed mumichae closed 3 weeks ago
Thanks a lot, @mumichae!
The main issue here is actually ignoring the mod-order
attribute in read_zarr
.
The proper fix will be coming with v0.3.
More clarifications:
although I couldn't confirm this in the anndata objects
ABHD17A
gene name is in all three modalities and hence is repeated three times in the global annotation.
Considering many gene name duplications across modalities, the order of global .var
annotation (if there were any) would have been mixed up as there would be no way to know which modality the duplicated features really came from.
With correct mod-order
the concatenation of var_names
of individual modalities in the correct order matches the global var_names
.
By the way, feature name duplications is something that MuData's design advises against. Is it multimodal data at all? Could the axes interface be useful here?
Closing as resolved in v0.3.
Describe the bug Getting the following error when trying to read a zarr file
The key 'ABHD17A' exists in the dataset and seems to be duplicated according to the part of the code that is run (although I couldn't confirm this in the anndata objects that I used to create the mudata zarr file.
To Reproduce example.h5mu.zarr.zip
Expected behaviour No error when reading the file
System
Additional context After some exploration, I found that making copies of the assigned values solved the problem for me
https://github.com/scverse/mudata/blob/29b5a1186655eed8211e08270e80f2e12521057c/mudata/_core/mudata.py#L789-L790
I made those changes in PR #49