Thank you for this great tool. I have two questions about cross-group comparison in CellChat.
- In netVisual_diffInteraction, the differential network is computed by directly subtracting weight values between two datasets. e.g.,
obj1 <- object@net[[comparison[1]]][['weight']]
obj2 <- object@net[[comparison[2]]][['weight']]
net.diff <- obj2 - obj1
Doesn't this assume there are no batch effects between datasets? If the datasets have different sequencing depths or other issues, shouldn't we normalize or scale the weights before subtraction?
- If direct subtraction is acceptable for pairwise comparison, can I simply extract weight matrices from individual CellChat objects (3+ groups) and merge them directly to make a custom heatmap (e.g., using pheatmap) for comparison? For example:
#LR
g1<-cellchat1@net$prob[1,5,3:6]
g2<-cellchat2@net$prob[1,5,3:6]
g3<-cellchat3@net$prob[1,5,3:6]
LR <- rbind(group1=g1, group2=g2, group3=g3)
pheatmap(LR)
# cell-cell
weight_group1 <- cellchat1@net$weight
weight_group2 <- cellchat2@net$weight
weight_group3 <- cellchat3@net$weight
cc <- cbind(weight_group1[,2], weight_group2[,2], weight_group3[,2])
pheatmap(cc)
Thanks!
Thank you for this great tool. I have two questions about cross-group comparison in CellChat.
Doesn't this assume there are no batch effects between datasets? If the datasets have different sequencing depths or other issues, shouldn't we normalize or scale the weights before subtraction?
Thanks!