Starlitnightly / omicverse

A python library for multi omics included bulk, single cell and spatial RNA-seq analysis.
https://starlitnightly.github.io/omicverse/
GNU General Public License v3.0
431 stars 45 forks source link

A problem about batch correction in single-cell-tutorial's code #54

Closed DestinyXuanQAQ closed 4 months ago

DestinyXuanQAQ commented 8 months ago

Describe the bug It is a KeyError when I use this code.

To Reproduce simba_object.gen_graph() simba_object.train(num_workers=6) adata2=simba_object.batch_correction() # This code can not run and say that KeyError adata.obsm['X_simba']=adata2.obsm['X_simba'].copy()

out put out put.txt

Expected behavior Batch correction

Screenshots ca54f16f45f22b8c544cef675722256 1f69e98a97041d125c334357b3f55a4

Desktop (please complete the following information): omicverse 1.5.7 WSL2 ubuntu20.04 windows10

Additional context The tutorial is https://single-cell-tutorial.readthedocs.io/zh/latest/preprocess/2-5/

Starlitnightly commented 8 months ago

@mugpeng There seems to be something wrong with your pull request #27

mugpeng commented 8 months ago

Could you provide your input obj or with the similar structure?

DestinyXuanQAQ commented 8 months ago

Could you provide your input obj or with the similar structure?

I am following this tutorial to run the code, all the data and code is there

https://single-cell-tutorial.readthedocs.io/zh/latest/preprocess/2-5/

data: s1d3: https://figshare.com/ndownloader/files/41932005 s2d1: https://figshare.com/ndownloader/files/41932011 s3d7: https://figshare.com/ndownloader/files/41932008

The error is occurring in the part "基于细胞与特征共嵌入图".

mugpeng commented 8 months ago

Please check #57 @Starlitnightly