Closed benemead closed 3 months ago
Thanks for noticing and reporting that, @benemead! It's an easy fix, and it will be there with v0.3.
Hi,
I'm running in an error i think connected this issue. When trying to retreive all keys in .uns with mdata.uns_keys()
I'll get the following: AttributeError: 'MuData' object has no attribute '_uns'
. You can fix this in file /mudata/_core/mudata.py if you change return list(self._uns.keys())
to return list(self.uns.keys())
(line 1193). Not sure whether its intended to be that way or whether in the init self._uns
(line 137) should be used instead of self.uns like the rest (self._obs, self._var, ...) . Im running mudata 0.2.3.
Cheers
Thanks @leuschjanphilipp and @benemead,
The fix will land in v0.3. Moreover, it now borrows DictView
from anndata
so it should come with improved behaviour when trying to modify .uns
of a view.
Describe the bug After a read of the mudata documentation it's unclear to me if mudata supports the
.uns
akin to anndata. I see that each.mod
(anndata) supports.uns
, but when I assign a.uns
directly to themdata
object, the behavior is unpredictable - specifically, any slice of themdata
object results in a loss of anymdata.uns
, but otherwise I am able to interact withmdata.uns
as expected.To Reproduce
Expected behaviour
returns:
{}
versus the expected{ 'test_dict':{'test':'dict'}}
System