cellgeni / sceasy

A package to help convert different single-cell data formats to each other
GNU General Public License v3.0
363 stars 53 forks source link

Issue running sceasy #19

Closed vtosevski closed 3 years ago

vtosevski commented 3 years ago

Hello everyone, I am having issues running sceasy for conversion from sce object to anndata. Following repo instructions, I run:

use_condaenv('sceasy')
loompy <- reticulate::import('loompy')
sceasy::convertFormat(sce, from="sce", to="anndata",
                      outFile='out.h5ad')

and get

Error in py_module_import(module, convert = convert) : 
  ImportError: cannot import name 'IndexMixin' from 'scipy.sparse.sputils' (/home/vinko/miniconda3/envs/sceasy/lib/python3.8/site-packages/scipy/sparse/sputils.py)

My sceasy environment contains recommended versions of anndata and loompy, and newest version of scipy:

(sceasy) vinko@DESKTOP-01:~$ conda list
# packages in environment at /home/vinko/miniconda3/envs/sceasy:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
anndata                   0.6.19                   pypi_0    pypi
blas                      1.0                         mkl  
ca-certificates           2020.10.14                    0  
certifi                   2020.6.20          pyhd3eb1b0_3  
h5py                      2.10.0           py38hd6299e0_1  
hdf5                      1.10.6               hb1b8bf9_0  
intel-openmp              2020.2                      254  
ld_impl_linux-64          2.33.1               h53a641e_7  
libedit                   3.1.20191231         h14c3975_1  
libffi                    3.3                  he6710b0_2  
libgcc-ng                 9.1.0                hdf63c60_0  
libgfortran-ng            7.3.0                hdf63c60_0  
libstdcxx-ng              9.1.0                hdf63c60_0  
loompy                    2.0.17                   pypi_0    pypi
mkl                       2020.2                      256  
mkl-service               2.3.0            py38he904b0f_0  
mkl_fft                   1.2.0            py38h23d657b_0  
mkl_random                1.1.1            py38h0573a6f_0  
natsort                   7.0.1                      py_0  
ncurses                   6.2                  he6710b0_1  
numpy                     1.19.2           py38h54aff64_0  
numpy-base                1.19.2           py38hfa32c7d_0  
openssl                   1.1.1h               h7b6447c_0  
packaging                 20.4                     pypi_0    pypi
pandas                    1.1.3            py38he6710b0_0  
pip                       20.2.4           py38h06a4308_0  
pyparsing                 2.4.7                    pypi_0    pypi
python                    3.8.5                h7579374_1  
python-dateutil           2.8.1                      py_0  
pytz                      2020.1                     py_0  
readline                  8.0                  h7b6447c_0  
scipy                     1.5.3                    pypi_0    pypi
setuptools                50.3.0           py38h06a4308_1  
six                       1.15.0                     py_0  
sqlite                    3.33.0               h62c20be_0  
tk                        8.6.10               hbc83047_0  
wheel                     0.35.1                     py_0  
xz                        5.2.5                h7b6447c_0  
zlib                      1.2.11               h7b6447c_3  

I tried upgrading to anndata==0.7.1 as recommended in https://github.com/cellgeni/sceasy/issues/7 but that had no effect. I am on Ubuntu 20.04 Is there a solution to this problem? Thanks, Vinko

nh3 commented 3 years ago

IndexMixin is not available in scipy.sparse.sputils from 1.3 and above. Downgrade scipy to 1.2.x should solve the problem. Alternatively, try identify which package is asking for IndexMixin during import anndata (e.g. do it in python).

vtosevski commented 3 years ago

Thanks, that indeed solves the issue! Best, Vinko