Hello,
thank you for creating milopy! I have been using it quite often lately, but now I discovered an issue:
When I start a Jupyterlab kernel, load milo as in your documentation and run it on an AnnData Object, it works flawlessly. However, if I then run it again directly after in the same session (even after reloading the AnnData Object), I get the error AttributeError: recarray has no attribute columns.
This is the code I ran:
milo.make_nhoods(adata)
milo.count_nhoods(adata, sample_col="SAMPLE")
milo.DA_nhoods(adata, design="~ GROUP")
I traced this down to the core module in line 240 (DA_nhoods), where the res object is not properly converted from R. I can quickfix this by adding
if isinstance(res, np.recarray):
res = pd.DataFrame(res)
But probably this issue runs deeper and concerns the rpy2 conversion process?
Is this something you have encountered as well? Or do you need further information from my side to reproduce it?
Hello,
thank you for creating milopy! I have been using it quite often lately, but now I discovered an issue:
When I start a Jupyterlab kernel, load milo as in your documentation and run it on an AnnData Object, it works flawlessly. However, if I then run it again directly after in the same session (even after reloading the AnnData Object), I get the error
AttributeError: recarray has no attribute columns.This is the code I ran:
I traced this down to the core module in line 240 (
DA_nhoods), where theresobject is not properly converted from R. I can quickfix this by addingBut probably this issue runs deeper and concerns the rpy2 conversion process?
Is this something you have encountered as well? Or do you need further information from my side to reproduce it?