zcang / COMMOT

MIT License
75 stars 13 forks source link

error' single positional indexer is out-of-bounds' when using 'ct.tl.spatial_communication' #29

Open yao50985098 opened 5 months ago

yao50985098 commented 5 months ago

Hello, thank you for your nice work for quantifying spatial signaling. I got an error when calculating customized pathway using ct.tl.spatial_communication. I followed the steps in your uploaded code in the breast slide. 截屏2024-01-20 01 21 11

Then : 截屏2024-01-20 01 23 27 截屏2024-01-20 01 23 42 I think I generated the right form, since some pathways were successfully calculated,but more pathways got the error' single positional indexer is out-of-bounds' . Looking forward to your kind help, thank you!

izabellaleahz commented 5 months ago

I also had this issue and it turned out to be the fact that there was no overlap between the gene list in the adata and df_ligrec[0] genes. In my case it was the gene names in adata were lowercase instead of uppercase.