CSOgroup / cellcharter

A Python package for the identification, characterization and comparison of spatial clusters from spatial -omics data.
https://cellcharter.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
69 stars 2 forks source link

Couldn't import package #13

Closed Feanor007 closed 1 year ago

Feanor007 commented 1 year ago

Report

I tried to follow your tutorial on Spatial Clustering on CODEX data. However, I encountered following errors when tried to import packages. Screen Shot 2023-06-27 at 05 35 00

I installed by running pip install cellcharter[proteomics]

Version information

No response

marcovarrone commented 1 year ago

Hi @Feanor007, it looks more like a squidpy problem than a cellcharter one. Probably the version of squidpy and spatialdata that you have are not fully compatible.

Can you tell me the versions of the squidpy and spatialdata packages currently installed? Try to update them and let me know if it works :)

Feanor007 commented 1 year ago

Thanks for getting back to me earlier. I'm using version 0.0.12 of spatialdata and version 1.3.0 of squidpy.

Just thought I'd share, I managed to sidestep the error I was dealing with. I did a full reinstall using pip install cellcharter, then manually grabbed the trVAE files from /docs/notebooks/. If I skipped the manual download, I ran into an error when I tried running model = cc.tl.TRVAE.load('./tutorial_models/codex_mouse_spleen_trvae', adata, map_location='cpu').

Now, everything's running smoothly and I'm getting the figures from your CODEX tutorial, no problem. One thing that could be cool for the tutorial is if you could include the code for shape characterization, like in Figure 2.h.

Keep up the great work, and thanks again!

marcovarrone commented 1 year ago

Thank you very much, I will fix it in the next release!

Yes, the shape analysis will be the next piece of CellCharter that I will add as soon as I finish the differential neighborhood enrichment. I will have to do some changes to the original private code because I want to make it compatible with Shapely 2.0 from the beginning.