Liftcells is erroneously altering ligand source cell ID
First, Thank you for this fantastic package! However, I am having an issue where some aspects switch the ligand cluster source while others do not.
In my data the only sources of Spp1 for Mdr2KO are Mid1 and Mid2, while WT is Chol1 but after running netMappingDEG it says the source of Spp1 is from HepChollike and KC clusters, which have zero expression of it (based on seurat vlnplot and dotplots and by using findEnrichedSignaling on the cellchat object list).
df <- findEnrichedSignaling(object.list.1[[1]], features = c("Spp1","Cd44"), pattern ="incoming") df2 <- findEnrichedSignaling(object.list.1[[2]], features = c("Spp1","Cd44"), pattern ="incoming") yields
df (WT):
df2 (Mdr2KO):
Cellchat object is merged from these two via: object.list.1 <- list(WT = WTcellchat, Mdr2KO = Mdr2KOcellchat) cellchat.Mdr2KOvsWT <- mergeCellChat(object.list.1, add.names = names(object.list.1), cell.prefix = TRUE) cellchat.Mdr2KOvsWT
net1 <- netMappingDEG(cellchat.Mdr2KOvsWT, features.name = features.name, variable.all = TRUE)
yields
The variable features for the cellchat object show this:
View([email protected][["WT"]][["features.info"]])
View([email protected][["Mdr2KO"]][["features.info"]])
but the merged looks like this:
View([email protected][["Mdr2KO.merged.info"]])
I think it has to do with whatever is created that netvisual_bubble pulls from bc:
netVisual_bubble(cellchat.Mdr2KOvsWT, sources.use = c("Mid1"), targets.use = c(1:18), comparison = c(2,1), angle.x = 45)
However, circleplots show the correct interactions.
pathways.show <- c("SPP1") weight.max <- getMaxWeight(object.list.1, slot.name = c("netP"), attribute = pathways.show) # control the edge weights across different datasets par(mfrow = c(1,1), xpd=TRUE) for (i in 1:length(object.list.1)) { netVisual_aggregate(object.list.1[[i]], signaling = pathways.show, layout = "circle", edge.weight.max = weight.max[1], edge.width.max = 10, signaling.name = paste(pathways.show, names(object.list.1)[i])) }
yeilds
sources <- "HepChollike"
gg1 <- netVisual_bubble(cellchat.Mdr2KOvsWT, sources.use = sources, targets.use = c(1:16), comparison = c(2, 1), max.dataset = 2, title.name = paste0(sources," increased signaling in Mdr2KO vs WT"), angle.x = 45, remove.isolate = T)
gg2 <- netVisual_bubble(cellchat.Mdr2KOvsWT, sources.use = sources, targets.use = c(1:169), comparison = c(2, 1), max.dataset = 1, title.name = paste0(sources," decreased signaling in Mdr2KO vs WT"), angle.x = 45, remove.isolate = T) gg1 + gg2
Leads to
and when sources are Mid1 or Mid2, which should have outgoing Spp1 to Cd44 on Chol1 and or 2 it shows that it doesn't: sources <- "Mid2" gg1 <- netVisual_bubble(cellchat.Mdr2KOvsWT, sources.use = sources, targets.use = c(1:16), comparison = c(2, 1), max.dataset = 2, title.name = paste0(sources," increased signaling in Mdr2KO vs WT"), angle.x = 45, remove.isolate = T)
gg2 <- netVisual_bubble(cellchat.Mdr2KOvsWT, sources.use = sources, targets.use = c(1:16), comparison = c(2, 1), max.dataset = 1, title.name = paste0(sources," decreased signaling in Mdr2KO vs WT"), angle.x = 45, remove.isolate = T) gg1 + gg2
Any help would be greatly appreciated. I have attached my cellchat object as a zip file.
This looks to be the same issue mentioned back in march:
https://github.com/jinworks/CellChat/issues/108