sqjin / CellChat

R toolkit for inference, visualization and analysis of cell-cell communication from single-cell data
GNU General Public License v3.0
623 stars 142 forks source link

function netAnalysis_signalingRole_scatter, difference between signaling = NULL and signaling = all pathways as input? #637

Open trnguyenuka opened 1 year ago

trnguyenuka commented 1 year ago

Hello,

thank you so much for developing this great tool!

I have a question regarding the function netAnalysis_signalingRole_scatter. As far as I understand, if we let signaling = NULL, analysis will be done on aggregated data for all pathways and if we let signaling = <a pathway>, the analysis will be done specifically for that pathway only. However, I observe that these two results below are different in the count values:

image

image

And when I try to plot with a single pathway, the count is always 0 too. image

Could you please have a look and help me to understand this?

All the best, H.N

sqjin commented 1 year ago

@trnguyenuka I checked these setting using the example data, and I did not observed the issue you mentioned.

cellchat <- readRDS("~/Mirror/CellChat/tutorial/cellchat_humanSkin_LS.rds")

netAnalysis_signalingRole_scatter(cellchat) netAnalysis_signalingRole_scatter(cellchat, signaling = cellchat@netP$pathways)

netAnalysis_signalingRole_scatter(cellchat, signaling = c("CXCL", "CCL")) netAnalysis_signalingRole_scatter(cellchat, signaling = c("CXCL")) netAnalysis_signalingRole_scatter(cellchat, signaling = c("GALECTIN"))