You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Triger AttributeError "X not found" when use layer parameter in mu.tl.embedding.
To Reproduce mu.pl.embedding( md, "X_umap", color=[*some gene*], cmap="Reds", layer="sct_corrected", )
then a attribute error was triggered
AttributeError Traceback (most recent call last)
~/softwares/anaconda3/lib/python3.8/site-packages/muon/_core/plot.py in embedding(data, basis, color, use_raw, layer, >**kwargs)
120 if layer is not None:
121 if layer in data.mod[m].layers:
--> 122 fmod_adata.X = data.mod[m][:, mod_keys].layers[layer].X
123 if use_raw:
124 warnings.warn(f"Layer='{layer}' superseded use_raw={use_raw}")
Describe the bug
Triger AttributeError "X not found" when use layer parameter in mu.tl.embedding.
To Reproduce
mu.pl.embedding( md, "X_umap", color=[*some gene*], cmap="Reds", layer="sct_corrected", )
then a attribute error was triggered
Additional context
This error appears to be caused by a typo. In fact a simple deletion of the
.X
will fix this bug.https://github.com/PMBio/muon/blob/e77bbf3a2acb1c92dae4c13419cd7335602c2735/muon/_core/plot.py#L122Thanks developers for providing such a great tool.
The text was updated successfully, but these errors were encountered: