Skip to content

ov.pp.qc() #270

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

Open
zhaofy123 opened this issue Mar 18, 2025 · 5 comments
Open

ov.pp.qc() #270

zhaofy123 opened this issue Mar 18, 2025 · 5 comments

Comments

@zhaofy123
Copy link

Describe the bug
KeyError: 'False: boolean label can not be used without a boolean index'

here is report


KeyError Traceback (most recent call last)
File :1

File ~/anaconda3/envs/omicvs/lib/python3.10/site-packages/omicverse/pp/_qc.py:195, in qc(adata, **kwargs)
193 if settings.mode == 'gpu':
194 print('GPU mode activated')
--> 195 return qc_gpu(adata,**kwargs)
196 else:
197 print('CPU mode activated')

File ~/anaconda3/envs/omicvs/lib/python3.10/site-packages/omicverse/pp/_qc.py:464, in qc_gpu(adata, mode, min_cells, min_genes, nmads, max_cells_ratio, max_genes_ratio, batch_key, doublets, doublets_method, path_viz, tresh, mt_startswith, mt_genes)
462 # QC plot
463 QC_test = (adata.obs['passing_mt']) & (adata.obs['passing_nUMIs']) & (adata.obs['passing_ngenes'])
--> 464 removed = QC_test.loc[lambda x : x is False]
465 removed_cells.extend(list(removed.index.values))
466 print(f'Total cell filtered out with this last --mode {mode} QC (and its chosen options):
467 {n1-np.sum(QC_test)}')

File ~/anaconda3/envs/omicvs/lib/python3.10/site-packages/pandas/core/indexing.py:1191, in _LocationIndexer.getitem(self, key)
1189 maybe_callable = com.apply_if_callable(key, self.obj)
1190 maybe_callable = self._check_deprecated_callable_usage(key, maybe_callable)
-> 1191 return self._getitem_axis(maybe_callable, axis=axis)

File ~/anaconda3/envs/omicvs/lib/python3.10/site-packages/pandas/core/indexing.py:1430, in _LocIndexer._getitem_axis(self, key, axis)
...
1244 isinstance(key.start, bool) or isinstance(key.stop, bool)
1245 ):
1246 raise TypeError(f"{key}: boolean values can not be used in a slice")

@zhaofy123
Copy link
Author

I find this is a really interesting bug.It is only happened when i use 'gpu mode' because everything is ok if i choose 'cpu mode'.My gpu is RTX4070tisuper, and the cuda version is 12.4.

@aaa7260
Copy link

aaa7260 commented Mar 18, 2025

Image

每次使用GPU就会卡在这个界面,很久都没反应,但是使用rsc就不会

@zhaofy123
Copy link
Author

所以ov的预处理环节,你们使用gpu是没有出现类似的报错吗,想知道你使用的的版本。

@aaa7260
Copy link

aaa7260 commented Mar 19, 2025

所以ov的预处理环节,你们使用gpu是没有出现类似的报错吗,想知道你使用的的版本。

我使用的是omicverse 1.6.10,我按照你的源代码,在python里分开执行,rsc.pp.highly_variable_genes(adata, n_top_genes=3000, flavor="pearson_residuale",layer='counts')这一步过不去,不指定layers并且使用flavor=‘seurat_V3’就可以继续下去,使用layer=‘counts’,会提示TypeError: The input is not a CuPy ndarray or CuPy sparse matrix. Rapids-singlecell only supports GPU matrices in this function, so your input must be either a CuPy ndarray or a CuPy sparse matrix. Please checkout rapids_singlecell.get.anndata_to_GPU to convert your data to GPU. If you're working with CPU-based matrices, please consider using Scanpy instead.
使用flavor="pearson_residuale"会flavor="pearson_residuale"

感谢大佬的回答

@Starlitnightly
Copy link
Owner

Maybe this issue caused by the updated of rapid_single_cell

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

3 participants