-
Notifications
You must be signed in to change notification settings - Fork 602
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
Illegal slicing argument for scalar dataspace when attempting to read 10x_h5 with version 1.9.0 #2203
Comments
Can you share the output of I'm unable to reproduce with recent cellranger outputs. |
Hey sorry for the delay:
|
I got similar error when I was trying to use .h5 file from cellbender output. I have multiome data. `>>> adata = scanpy.read_10x_h5("/sc/arion/projects/hmDNAmap/snHeroin/analysis/ARC_TD005235-354/outs/cellbender/cb_feature_bc_matrix_filtered.h5", gex_only=False)`
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/sc/arion/work/gujarh01/software/anaconda3/lib/python3.9/site-packages/scanpy/readwrite.py", line 183, in read_10x_h5
adata = _read_v3_10x_h5(filename, start=start)
File "/sc/arion/work/gujarh01/software/anaconda3/lib/python3.9/site-packages/scanpy/readwrite.py", line 268, in _read_v3_10x_h5
_collect_datasets(dsets, f["matrix"])
File "/sc/arion/work/gujarh01/software/anaconda3/lib/python3.9/site-packages/scanpy/readwrite.py", line 256, in _collect_datasets
dsets[k] = v[:]
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/sc/arion/work/gujarh01/software/anaconda3/lib/python3.9/site-packages/h5py/_hl/dataset.py", line 738, in __getitem__
selection = sel2.select_read(fspace, args)
File "/sc/arion/work/gujarh01/software/anaconda3/lib/python3.9/site-packages/h5py/_hl/selections2.py", line 101, in select_read
return ScalarReadSelection(fspace, args)
File "/sc/arion/work/gujarh01/software/anaconda3/lib/python3.9/site-packages/h5py/_hl/selections2.py", line 86, in __init__
raise ValueError("Illegal slicing argument for scalar dataspace")
> **ValueError: Illegal slicing argument for scalar dataspace**
anndata 0.8.0 PIL 8.4.0 Python 3.9.7 (default, Sep 16 2021, 13:09:58) [GCC 7.5.0] Session information updated at 2022-05-17 14:56 |
I'm getting the same error using the CellBender tutorial output. Attaching the file to make it easier to reproduce.
|
Was this fixed by #2344 ? Edit: Yes |
* Handle scalar datasets too After @ivirshup's pytables PR (#2064) we started having issues with loading h5 files with scalar datasets, such as those created by CellBender (broadinstitute/CellBender#128). It is currently not an issue for the 10X h5 files for now since they don't have any scalars, however it'd be good to just handle scalars as well as arrays 1- to fix the cellbender file loading problem 2- to fix potential problems we might end up having if 10X h5 format includes scalar datasets. * Add a scalar to the multiple_genomes.h5 test file * Fixes #2203
Hi
When attempting so simply read a h5 file with:
I get the following error which is fixed when rolling back to scanpy=1.8.2
Thanks!!
Nadav
The text was updated successfully, but these errors were encountered: