gustaveroussy / sopa

Technology-invariant pipeline for spatial omics analysis (Xenium / Visium HD / MERSCOPE / CosMx / PhenoCycler / MACSima / ...) that scales to millions of cells
https://gustaveroussy.github.io/sopa/
BSD 3-Clause "New" or "Revised" License
123 stars 14 forks source link

ImportError: cannot import name '_get_unique_label_values_as_index' from 'spatialdata._core.query.relational_query' #37

Closed suhridbuddha closed 6 months ago

suhridbuddha commented 6 months ago

Is anyone facing the same error while running with the cellpose_baysor.yaml config file?

ImportError: cannot import name '_get_unique_label_values_as_index' from 'spatialdata._core.query.relational_query' (/home/ryanr2/miniconda3/envs/sopa/lib/python3.10/site-packages/spatialdata/_cor e/query/relational_query.py)

I am using lsf profile

quentinblampey commented 6 months ago

This might be related to an old version of spatialdata, but I'm not sure. What are your versions of sopa and spatialdata? Can you try updating the dependencies? If you installed sopa in editable mode, it is pip install -e . --upgrade, else pip install sopa --upgrade

Otherwise, do you have the full error log, or at least the name of the step where this error happened?

Also, I see you're using a LSF profile. Is it a very generic LSF profile? If it is, and if you would like to contribute, I would be very happy to add your LSF profile to sopa, let me know 🙂

quentinblampey commented 6 months ago

Hello @suhridbuddha, I was able to reproduce the issue.

I think this is related to a newer version of spatialdata-io. Can you try to upgrade the two packages as below:

pip install spatialdata-io --upgrade
pip install spatialdata --upgrade

You may have warnings during the pip install, because sopa depends spatialdata < 0.1.0, but just ignore the warning

I will soon release a new version of sopa, where this issue will be fixed, but I need to perform additionnel checks.

suhridbuddha commented 6 months ago

Hello @quentinblampey, i have reinstalled sopa again. it solved the problem. I believe it installed the newer spatialdata-io. Yes, I am using the generic snakemake-lsf profile

quentinblampey commented 6 months ago

Hello @suhridbuddha, glad it solved the issue!