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

[BUG] Cellxgene failing to launch h5ad files #2625

Open
chryssiebrown opened this issue Aug 16, 2023 · 12 comments
Open

[BUG] Cellxgene failing to launch h5ad files #2625

chryssiebrown opened this issue Aug 16, 2023 · 12 comments
Labels

Comments

@chryssiebrown
Copy link

Describe the bug
Receive the following error message when launching recently generated h5ad files

Error: File not found or is inaccessible. File must be an .h5ad object

I can launch other h5ad files in the same google drive folder and am also able to launch the files that I am having issues with when I use a different iMAC

To Reproduce
Steps to reproduce the behavior:
From the terminal:
cellxgene launch /Users/xxxx/Library/CloudStorage/GoogleDrive-xxxx/My\ Drive/xxx\ xx/cellxgene/xxxx.h5ad

Expected behavior
Files would usually launch

Screenshots
If applicable, add screenshots to help explain your problem.

Version (please complete the following information):

  • MAC
  • Safari
  • MAC OS Ventura 13.4

Additional context
Add any other context about the problem here.

@MaximilianLombardo
Copy link

Hey Chryssie - thanks - can you launch an h5ad with cellxgene when they are saved outside of your google drive folder?

Max

@chryssiebrown
Copy link
Author

chryssiebrown commented Aug 16, 2023 via email

@chryssiebrown
Copy link
Author

chryssiebrown commented Aug 24, 2023 via email

@Fougere87
Copy link

Hi everyone,
I had the same problem here when trying to read a recent h5ad file through a docker instance of cellxgene.
What is strange is that all my "old" h5ad files could be read without any problem.
No problem loading the file in scanpy as well

It seems to be related to old versions of python because numba cannot update with a python env below 3.8.
Using 3.9 or 3.10 python or env everything works perfectly.

Hope it helps !

@MaximilianLombardo
Copy link

@Fougere87 thanks for the suggestion! @chryssiebrown what version of python are you running? Does this fix the issue for you?

Hey @chryssiebrown, if that does not solve your problem, are you able to share the data file that is giving you trouble? Would you also be able to share the following info?

  • With what version was the file created?
  • Is that the same version as the files that work with CELLxGENE currently?
  • Could you also share the more complete stack trace here?

Apologies for the inundation of questions

@chryssiebrown
Copy link
Author

chryssiebrown commented Aug 25, 2023 via email

@yyoshiaki
Copy link

Hi everyone,

I got the same error with the docker container in several independent environments. You could reproduce the error as follows;

1. Docker setup

git clone https://github.com/chanzuckerberg/cellxgene.git
cd cellxgene
docker build . -t cellxgene

2. h5ad prep

import scanpy as sc

adata = sc.datasets.pbmc3k_processed()
adata.write('pbmc3k.h5ad')

my env

python 3.9.16
scanpy==1.9.3 anndata==0.9.1 umap==0.5.3 numpy==1.22.4 scipy==1.9.1 pandas==1.3.5 scikit-learn==1.2.2 statsmodels==0.14.0 python-igraph==0.10.4 pynndescent==0.5.10

3. launch cellxgene

docker run -v "$PWD:/data/" -p 5005:5005 cellxgene launch --host 0.0.0.0 data/pbmc3k.h5ad 

Error

[cellxgene] Starting the CLI...
[cellxgene] Loading data from pbmc3k.h5ad.
Error: File not found or is inaccessible. File must be an .h5ad object. Please check your input and try again.

The weird thing is that https://github.com/chanzuckerberg/cellxgene/raw/main/example-dataset/pbmc3k.h5ad worked well.

Best,
Yoshi

@Fougere87
Copy link

@yyoshiaki Yes that's all ok, but as you are running the dockerfile from the repo which uses ubuntu:bionic (18.04 :-D) as a base image.
Therefore, in your docker env, you have python 3.6.
Try running
docker -it run -v "$PWD:/data/" -p 5005:5005 --entrypoint bash cellxgene
and then launch python to see the version.

@chryssiebrown have you checked your numba and h5py versions ? Are you launching cellxgene from docker or in your terminal ?

Best,
Chlo

@yyoshiaki
Copy link

@Fougere87 Thank you so much for your quick response.
I checked python and library versions by docker run -it -v "$PWD:/data/" -p 5005:5005 --entrypoint bash cellxgene.
Python 3.6.9, anndata==0.7.8, h5py==3.1.0 were installed.

By changing the base image from bionic to jammy, for example, I could fix the problem, #2628

Thank you,
Yoshi

@chryssiebrown
Copy link
Author

chryssiebrown commented Aug 28, 2023 via email

@chryssiebrown
Copy link
Author

chryssiebrown commented Sep 2, 2023 via email

@timslittle
Copy link

Chryssie I hope that you solved this issue, but in case it is helpful I was having similar problems despite up-to-date Python etc, and it turned out that the issue was that I was compressing the h5ad file in a way that Cellxgene couldn't recognise.

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

No branches or pull requests

5 participants