jhu99 / scbean

Single-cell data analysis
https://scbean.readthedocs.io
MIT License
14 stars 4 forks source link

tfl.findNeighbors[adata_integrate] gives: KeyError: 'distances' #6

Open oldvalley49 opened 1 month ago

oldvalley49 commented 1 month ago

Hi! I was following the tutorial for integrating scRNA-seq data and scATAC-seq data using the dataset provided. However, I get the following error when I run the step: atac = tfl.findNeighbors(adata_integrate)


KeyError Traceback (most recent call last) Cell In[21], line 1 ----> 1 atac=tfl.findNeighbors(adata_integrate)

File ~/anaconda3/envs/scbean/lib/python3.8/site-packages/scbean/tools/transferLabel.py:23, in findNeighbors(adata) 21 ann_atac["pred_max_score"]=0.0 22 querycells = ann[ann['tech']=="atac"]['nid'] ---> 23 dist=adata.uns['neighbors']['distances'] 24 weights[weights.index]=np.ones(len(weights)) 25 weights["Platelets"]=0.001

KeyError: 'distances'

Any help would be greatly appreciated!

ZhangStudyHard commented 3 weeks ago

Hi! Thank you for your email! In order to solve your problem, can you provide a description of the running environment or adata data, otherwise I can't answer your question, you can read the installation instructions carefully and install the latest version, if you still encounter the same problem, you can send me the adata data in the first step of the problem, I will see how to solve this problem.