-
Notifications
You must be signed in to change notification settings - Fork 2
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
Index error in the normalization step #1
Comments
Hello, |
Hi Ye, Thanks a lot for your timely response! Yes, I am able to run the demo data with no error. The problem I am facing now is trying to use 3DVI+ for our own single-cell HiC data. If possible, could you please help me with it? The input file looks like this: Before running 3DVI+, I concatenated the data files for all chromosomes together, and, since there is only 1 dataset, I did not input the cell summary. Could this be the problem? Here is the program output before running into this error: Thank you so much! |
Hello, "I concatenated the data files for all chromosomes together, and, since there is only 1 dataset, I did not input the cell summary." ".../anaconda3/envs/schic-3dvi/lib/python3.8/site-packages/scvi/data/_anndata.py:709: UserWarning: Category 0 in adata.obs['_scvi_batch'] has fewer than 3 cells. SCVI may not train properly." Please keep all the interactions within each cell in an independent file. You can refer to the demoData folder for reference. Best, |
Hi,
I got an error "IndexError: Unknown indexer True of type <class 'numpy.bool_'>" with the following traceback:
Traceback (most recent call last):
File "3DVI/scripts/3DVI.py", line 373, in
res = [normalize(bandM, cellInfo, chromSelect, bandDist, nLatent, batchFlag, gpuFlag) for bandM, chromSelect, bandDist in bandMiter]
File "3DVI/scripts/3DVI.py", line 373, in
res = [normalize(bandM, cellInfo, chromSelect, bandDist, nLatent, batchFlag, gpuFlag) for bandM, chromSelect, bandDist in bandMiter]
File "3DVI/scripts/3DVI.py", line 157, in normalize
scvi.data.setup_anndata(adata)
File ".../anaconda3/envs/schic-3dvi/lib/python3.8/site-packages/scvi/data/_anndata.py", line 191, in setup_anndata
local_l_mean_key, local_l_var_key = _setup_library_size(adata, batch_key, layer)
File ".../anaconda3/envs/schic-3dvi/lib/python3.8/site-packages/scvi/data/_anndata.py", line 807, in _setup_library_size
_compute_library_size_batch(
File ".../anaconda3/envs/schic-3dvi/lib/python3.8/site-packages/scvi/data/_utils.py", line 73, in _compute_library_size_batch
data = adata[idx_batch].X
File ".../anaconda3/envs/schic-3dvi/lib/python3.8/site-packages/anndata/_core/anndata.py", line 1108, in getitem
oidx, vidx = self._normalize_indices(index)
File ".../anaconda3/envs/schic-3dvi/lib/python3.8/site-packages/anndata/_core/anndata.py", line 1089, in _normalize_indices
return _normalize_indices(index, self.obs_names, self.var_names)
File ".../anaconda3/envs/schic-3dvi/lib/python3.8/site-packages/anndata/_core/index.py", line 35, in _normalize_indices
ax0 = _normalize_index(ax0, names0)
File ".../anaconda3/envs/schic-3dvi/lib/python3.8/site-packages/anndata/_core/index.py", line 107, in _normalize_index
raise IndexError(f"Unknown indexer {indexer!r} of type {type(indexer)}")
I have no idea what could cause the error. The command I use is:
python 3DVI/scripts/3DVI.py
-b "${bandMax}"
-c "${chrom}"
-r "${resolution}"
-i "${inputDir}"
-o "${outputDir}"
-g "${genomeSize}"
-n 100 -p "${cpuN}"
Could you please help me with it? Thanks a lot!
The text was updated successfully, but these errors were encountered: