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

IndexError in bidcell/processing/cell_gene_matrix.py #13

Open
diala-ar opened this issue Mar 27, 2024 · 1 comment
Open

IndexError in bidcell/processing/cell_gene_matrix.py #13

diala-ar opened this issue Mar 27, 2024 · 1 comment

Comments

@diala-ar
Copy link

Hi,

Thanks for the nice tool. I am trying to perform cell segmentation for Xenium data. I used the default parameters you shared for Xenium. When I run your pipeline, I get some errors during the processing step (please see below). The errors are the same, but generated for different processes (from Process-217 to Process-240). These errors do not stop the pipeline from performing the training and prediction and from generating all the expected outputs. How can I change the parameters in the yaml file in order to prevent this error? Or can I just ignore those errors?

Reading DAPI image
/cluster/projects/mcgahalab/SEQUENCES/2024/20240209__214539__Brooks_Matthew_240207/output-XETG00082__0018494__INS_D_008_C2T__20240209__214556/morphology_mip.ome.tif
DAPI shape h: 20461 w: 42632
Segmenting DAPI patches h: 20461 w: 32000
Nuclei image h: 4348 w: 9059
...

Transforming x_location
Transforming y_location
0 12609 10180 14999
Extracting cell-gene matrix chunks
50%|█████ | 3/6 [03:58<03:13, 64.46s/it]/cluster/home/dabdrabb/miniforge3/envs/bidcell/lib/python3.10/site-packages/numpy/core/fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is deprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.
return bound(*args, **kwds)
Combining cell-gene matrix chunks
Patch H 15000:20461, W 0:15000
(5461, 15000)
Reading filtered transcripts
3.2554653 9054.4 4.3321505 4342.8413
Transforming x_location
Transforming y_location
nan nan nan nan
Transforming x_location
Transforming y_location
nan nan nan nan
Extracting cell-gene matrix chunks
**Process Process-217:
Traceback (most recent call last):
File "/cluster/home/dabdrabb/miniforge3/envs/bidcell/lib/python3.10/site-packages/pandas/core/indexes/range.py", line 1018, in getitem
return self._range[new_key]
IndexError: range object index out of range

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/cluster/home/dabdrabb/miniforge3/envs/bidcell/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/cluster/home/dabdrabb/miniforge3/envs/bidcell/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, self._kwargs)
File "/cluster/home/dabdrabb/miniforge3/envs/bidcell/lib/python3.10/site-packages/bidcell/processing/cell_gene_matrix.py", line 27, in process_chunk
chunk_id = chunk.index[0]
File "/cluster/home/dabdrabb/miniforge3/envs/bidcell/lib/python3.10/site-packages/pandas/core/indexes/range.py", line 1020, in getitem
raise IndexError(
IndexError: index 0 is out of bounds for axis 0 with size 0

...

Process Process-240:
Traceback (most recent call last):
File "/cluster/home/dabdrabb/miniforge3/envs/bidcell/lib/python3.10/site-packages/pandas/core/indexes/range.py", line 1018, in getitem
return self._range[new_key]
IndexError: range object index out of range

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/cluster/home/dabdrabb/miniforge3/envs/bidcell/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/cluster/home/dabdrabb/miniforge3/envs/bidcell/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/cluster/home/dabdrabb/miniforge3/envs/bidcell/lib/python3.10/site-packages/bidcell/processing/cell_gene_matrix.py", line 27, in process_chunk
chunk_id = chunk.index[0]
File "/cluster/home/dabdrabb/miniforge3/envs/bidcell/lib/python3.10/site-packages/pandas/core/indexes/range.py", line 1020, in getitem
raise IndexError(
IndexError: index 0 is out of bounds for axis 0 with size 0
67%|██████▋ | 4/6 [04:13<01:29, 44.94s/it]/cluster/home/dabdrabb/miniforge3/envs/bidcell/lib/python3.10/site-packages/numpy/core/fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is deprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.
return bound(*args, **kwds)
Combining cell-gene matrix chunks
Patch H 15000:20461, W 15000:30000

Thanks.

@diala-ar
Copy link
Author

diala-ar commented Apr 5, 2024

Hello Bidcell team or @xhelenfu , any update on the above problem please? Thanks.

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

No branches or pull requests

1 participant