ChaozhongLiu / TREASMO

Transcription regulation analysis toolkit for single-cell multi-omics data
GNU General Public License v3.0
4 stars 0 forks source link

During data preprocessing, an error occurred when running mu.pp.neighbors() #1

Open watermelon-flower opened 2 weeks ago

watermelon-flower commented 2 weeks ago

Hi TREASMO team, paper looked really cool! So I wanted to try and run on some of my own data and the code provided: rna = ad.read_h5ad('data/HSPC_Muon_RNA.h5ad') atac = ad.read_h5ad('data/HSPC_Muon_ATAC.h5ad') mdata = mu.MuData({"rna": rna, "atac": atac}) mu.pp.intersect_obs(mdata) mdata.shape mu.pp.neighbors(mdata, n_neighbors=20) mu.tl.umap(mdata) however, I get the following error message: Traceback (most recent call last): File "D:\PYTHON\lib\code.py", line 90, in runcode exec(code, self.locals) File "", line 78, in File "D:\PYCHARM\TREASMO\XUNI\lib\site-packages\muon_core\preproc.py", line 623, in neighbors mdata.obsp[conns_key] = connectivities File "D:\PYCHARM\TREASMO\XUNI\lib\site-packages\anndata_core\aligned_mapping.py", line 181, in setitem value = self._validate_value(value, key) File "D:\PYCHARM\TREASMO\XUNI\lib\site-packages\anndata_core\aligned_mapping.py", line 68, in _validate_value if self.parent.shape[axis] != dim_len(val, i): File "D:\PYTHON\lib\functools.py", line 875, in wrapper return dispatch(args[0].class)(*args, kw) File "D:\PYCHARM\TREASMO\XUNI\lib\site-packages\anndata\utils.py", line 69, in dim_len return x.shape[axis] AttributeError: 'tuple' object has no attribute 'shape'** can you tell me how can i solve it? Thank you!!!

ChaozhongLiu commented 2 weeks ago

Hi there, Thanks for you interests in TREASMO! From the error message, the problem seems to be with Muon, and it seems that they don't have clear error message on this. I suppose it could be due to version changes or your data.

Could you please try:

  1. what is the output of mdata.shape? Does it contain any cell?
  2. Switch to Muon version as the one my experiment used: 0.1.5
watermelon-flower commented 2 weeks ago

您好,感谢您对TREASMO的关注!从错误消息来看,问题似乎出在 Muon 上,而且他们似乎没有明确的错误消息。我想这可能是由于版本更改或您的数据造成的。

你能试试吗?

  1. 的输出是什么?它包含任何细胞吗?mdata.shape
  2. 切换到我的实验使用的 Muon 版本:0.1.5

I'm going to try to modify it based on your suggestion, thanks!!!