cellgeni / sceasy

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

Convert h5ad file to seurat file #78

Open sanderslhc opened 10 months ago

sanderslhc commented 10 months ago

Hi, I 'm using sceasy to convert my h5ad file to seurat file, but there are some problem. When I run the code "sceasy::convertFormat("Blood.h5ad", from="anndata", to="seurat",outFile='Blood.rds')", it will be stopped with "Error: ModuleNotFoundError: No module named 'pandas.core.index'". I have already update my panda to the newest but it still doesn't work. How can I fix it?

prete commented 10 months ago

I think it's the otherway around you need to downgrande your pandas, try pip install -U pandas==1.5.3

jestlin15 commented 8 months ago

Hi I faced the same issue and did pip install -U pandas==1.5.3 . however I got ImportError: cannot import name 'Float64Index' from 'pandas.core.indexes.api' after trying to run the convertFormat code again. May I know how I can fix this please? Thank you.

hopehealey commented 8 months ago

I received the same error after switching to pandas 1.5.3. Is there a different pandas version we should use?

kvegesan-stjude commented 6 months ago

Hello, I'm just commenting for future users. pandas==1.3.5 worked for me. After version 1.4, Float64Index was deprecated.

zhijunyuu commented 5 months ago

Hi,

I tried pandas==1.5.3 and pandas==1.3.5, both gave me the same error: cannot import name 'Float64Index' from 'pandas.core.indexes.api' any idea what I should do to fix it? Thanks

sinanugur commented 4 months ago

Hi,

Try pandas==1.5.4 anndata==0.9.1

Cheers

kvegesan-stjude commented 4 months ago

This is my environment

anndata==0.6.22.post1 Bottleneck==1.3.5 Brotli==1.0.9 certifi==2023.11.17 cffi==1.16.0 charset-normalizer==2.0.4 cryptography==41.0.7 h5py==3.9.0 idna==3.4 loompy==2.0.16 mkl-fft==1.3.8 mkl-random==1.2.4 mkl-service==2.4.0 natsort==7.1.1 numexpr==2.8.4 numpy==1.24.3 packaging==23.1 pandas==1.3.5 pip==23.3.1 platformdirs==3.10.0 pooch==1.7.0 pycparser==2.21 pyOpenSSL==23.2.0 PySocks==1.7.1 python-dateutil==2.8.2 pytz==2023.3.post1 requests==2.31.0 scipy==1.10.1 setuptools==68.2.2 six==1.16.0 tzdata==2023.3 urllib3==1.26.18 wheel==0.41.2 win-inet-pton==1.1.0

sinanugur commented 4 months ago

This is my environment

anndata==0.6.22.post1 Bottleneck==1.3.5 Brotli==1.0.9 certifi==2023.11.17 cffi==1.16.0 charset-normalizer==2.0.4 cryptography==41.0.7 h5py==3.9.0 idna==3.4 loompy==2.0.16 mkl-fft==1.3.8 mkl-random==1.2.4 mkl-service==2.4.0 natsort==7.1.1 numexpr==2.8.4 numpy==1.24.3 packaging==23.1 pandas==1.3.5 pip==23.3.1 platformdirs==3.10.0 pooch==1.7.0 pycparser==2.21 pyOpenSSL==23.2.0 PySocks==1.7.1 python-dateutil==2.8.2 pytz==2023.3.post1 requests==2.31.0 scipy==1.10.1 setuptools==68.2.2 six==1.16.0 tzdata==2023.3 urllib3==1.26.18 wheel==0.41.2 win-inet-pton==1.1.0

Yeah, anndata==0.9.1 is working, we just tested. and 0.6 returns an error. I recommend

pip install pandas==1.5.4 anndata==0.9.1