theislab / sfaira

data and model repository for single-cell data
https://sfaira.readthedocs.io
BSD 3-Clause "New" or "Revised" License
133 stars 13 forks source link

cellxgene data loaders not working #742

Open Rubbert opened 3 weeks ago

Rubbert commented 3 weeks ago

I am having issues downloading new data from cellxgene.

To get something like in the following tutorial working: https://github.com/theislab/sfaira_tutorials/blob/master/tutorials/cellxgene_download.ipynb

I had to do a few things: (1) Make sure to install "mamba install 'urllib3<2'" --> https://github.com/GeneralMills/pytrends/issues/591 (2) Use the dev version of sfaira (key "ethnicity" error described in other issue https://github.com/theislab/sfaira/issues/694) (3) Change the 'download' function in 'sfaira/data/dataloaders/databases/cellxgene/cellxgene_loader.py ', the following are the new lines (hopefully clear where they came from):

                    r = requests.get(url, timeout=60)
                    r.raise_for_status()
                    presigned_url = r.json()['url']

I guess cellxgene changed their api (they do not seem to allow requests.post)?

Still need to test the entire pipeline, but seems like this at least gets it to the point where it is downloading h5ad files.