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
273 stars 42 forks source link

Question from tutorial and max.dataset in netVisual_bubble() #158

Open Alexis-Varin opened 4 months ago

Alexis-Varin commented 4 months ago

Hi, First, thank you for your great package !

I have a question regarding the tutorial for multiple datasets and especially the max.dataset parameter in netVisual_bubble() In the tutorial, the plots look like this :

tuto cellchat max dataset

the code is :

gg1 <- netVisual_bubble(cellchat, sources.use = 4, targets.use = c(5:11),  comparison = c(1, 2), max.dataset = 2, title.name = "Increased signaling in LS", angle.x = 45, remove.isolate = T)
#> Comparing communications on a merged object
gg2 <- netVisual_bubble(cellchat, sources.use = 4, targets.use = c(5:11),  comparison = c(1, 2), max.dataset = 1, title.name = "Decreased signaling in LS", angle.x = 45, remove.isolate = T)
#> Comparing communications on a merged object
gg1 + gg2

I do not understand how interactions from NL dataset (for example, Inflam. FIB -> cDC2 (NL)) show up in increased signaling in LS. Shouldn't the x axis be dataset agnostic and only show the cell-cell interaction without any mention of the dataset it comes from (so, just Inflam. FIB -> cDC2) ? As I understood this, I thought it would substrat the commun. prob. from LS dataset by the commun. prob. of NL dataset for each pair of cells and only show the ones where the resulting commun. prob. would be positive, but I am perplexed by the results.

sqjin commented 4 months ago

@Alexis-Varin Your's idea is great. However, here we show both the signaling from two conditions together. When you compare ( Inflam. FIB -> cDC2 (NL) and Inflam. FIB -> cDC2 (LS)), you can see that MIF, CCL12, C3 and ANXA1 signaling increase in LS.