saezlab / decoupler-py

Python package to perform enrichment analysis from omics data.
https://decoupler-py.readthedocs.io/
GNU General Public License v3.0
146 stars 21 forks source link

Error when running get_pseudobulk(): AttributeError: 'csr_matrix' object has no attribute 'A' #141

Open raquelgarza opened 5 days ago

raquelgarza commented 5 days ago

Hi!

I'm running your tool on a jupyter notebook (python 3.12, macos) using an anndata generated with scanpy (1.10.1)

I got this error message when running get_pseudobulk(): image

I solved it by commenting line 262 and 263 from decoupler/utils_anndata.py

                #if isinstance(X, csr_matrix):
                #    profile = profile.A

I thought I would report it in case this is due to a dependency update.

PauBadiaM commented 4 days ago

Hi @raquelgarza,

This is an error introduced by the new version of scipy. I will make a fix but in the meantime you can downgrade scipy < 1.14.0.

PauBadiaM commented 3 days ago

Fixed in 2192575a1672bfd665b4de209fb9e6af3e17528c, you can install this devel version by running:

pip install git+https://github.com/saezlab/decoupler-py