perslab / CELLEX

CELLEX (CELL-type EXpression-specificity)
GNU General Public License v3.0
36 stars 9 forks source link

[BUG]:Error running eso.compute #33

Closed andrewjkwok closed 1 year ago

andrewjkwok commented 1 year ago

Hi - many thanks for this great tool. I'm struggling to get things to run as I keep running into an error:

ValueError: operands could not be broadcast together with shapes (9217,9) (9217,9216,10) for the eso.compute(verbose=True) step. This is happening both with my own dataset, and with the tutorial dataset from demo_mousebrain_vascular_cells.ipynb (the shape varies with which dataset I use).

I am running this on a Linux desktop, with CELLEX version 1.2.2. Is there any reason why this might be happening? Please let me know what else I could provide that would be useful.

Many thanks in advance.

tstannius commented 1 year ago

Hi Andrew!

My apologies for the late reply - I unfortunately did not receive a notification.

Thanks for submitting this issue. There may be multiple causes to the problem you are experiencing.

Regarding the first error, ValueError: operands could not be broadcast together with shapes (9217,9) (9217,9216,10) It is difficult to know the exact reason without a full strack trace - could you possibly post it? Judging by the shape of the dataset reported in the error, it appears CELLEX was expecting a 2D dataset, but got a 3D dataset.

Regarding your observation that this error also occurs with the tutorial dataset, I suspect this may relate to your environment. A similar error is reported in https://github.com/perslab/CELLEX/issues/34

My suggestion would be that you set up a separate environment for running CELLEX. In this environment you should install the versions of the libraries listed in the requirements.txt

setuptools>=41.2.0
setuptools_scm>=3.3.3
numpy>=1.17.0
scipy>=1.3.1
pandas>=1.0.3
h5py>=2.9.0
loompy>=3.0.6
adjustText>=0.7.3
plotnine>=0.6.0

Please let me know if either approach works out for you.

tstannius commented 1 year ago

Closing as question has been addressed. Please feel free to reopen if this is not the case.