jinworks / CellChat

R toolkit for inference, visualization and analysis of cell-cell communication from single-cell and spatially resolved transcriptomics
GNU General Public License v3.0
243 stars 34 forks source link

Error when set layout = "chord" in netVisual_aggregate() or netVisual_aggregate() #41

Open yunbokai opened 9 months ago

yunbokai commented 9 months ago

Hi, I want to use CellChat as the tutorial described in 'Brief tutorial for CellChat analysis of multiple spatially resolved transcriptomic datasets'. I got the result when set layout = "chord" in netVisual_aggregate() or netVisual_aggregate(). However, I got error when set layout = "spatial" in netVisual_aggregate() or netVisual_aggregate(). cellchat 'names' attribute [4] must be the same length as the vector [2]

Do you have any suggestion? Thanks

sqjin commented 8 months ago

@yunbokai No idea on this error. It works when I tried netVisual_aggregate(cellchat, signaling = pathways.show, layout = "spatial", slice.use = "A1")

phoebee-h commented 8 months ago

Hi, Not sure what is going on. I got this error too when pathways are in patterns like below. Error in names(x) <- value: 'names' attribute [4] must be the same length as the vector [2], which I am not able to use netVisual_aggregate, by setting layout = "spatial". However, layout = "circle" works fine.

`image

Thank you! Phoebe