Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert h5ad file to seurat file #78

Open
sanderslhc opened this issue Aug 29, 2023 · 11 comments
Open

Convert h5ad file to seurat file #78

sanderslhc opened this issue Aug 29, 2023 · 11 comments

Comments

@sanderslhc
Copy link

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
Copy link
Contributor

prete commented Aug 29, 2023

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

@jestlin15
Copy link

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
Copy link

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

@kvegesan-stjude
Copy link

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

@zhijunyuu
Copy link

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
Copy link

Hi,

Try pandas==1.5.4 anndata==0.9.1

Cheers

@kvegesan-stjude
Copy link

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
Copy link

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

@Lil-Psilocybe
Copy link

pip install pandas==1.5.4 anndata==0.9.1

When I tried I got ERROR: No matching distribution found for pandas==1.5.4

After looking online it says I may need to change my version of python, but how do I know which version of python works with this anndata and pandas? Thanks, I will try 1.5.3 in the meantime

@prete
Copy link
Contributor

prete commented Sep 3, 2024

For h5ad to Seurat you should try https://github.com/cellgeni/schard
It's native R so you don't need additionaly python libraries.

@Lil-Psilocybe
Copy link

Thanks for a quick reply! I actually got the ModuleNotFoundError: No module named 'pandas.core.index'" when I was converting seurat rds to scanpy h5ad, but there were no issue queries with this error during that type of conversion. I got the h5ad to generate when running pip install pandas==1.5.3 anndata==0.9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

8 participants