sqjin / CellChat

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

how do I hide autocrine (self to self) communication in netVisual_bubble? #622

Open pcantalupo opened 1 year ago

pcantalupo commented 1 year ago

Hello, trying to visualize the communication between two celltypes in both directions (i.e. T Cell -> Macrophage and Macrophage -> T Cell). My code is:

sources = c(5,8)  # T cell, Macrophage
targets = c(5,8)
pairLR.use.up = net.up[, "interaction_name", drop = F]
netVisual_bubble(cellchat, pairLR.use = pairLR.use.up, sources.use = sources, targets.use = targets, comparison = c(1, 2), angle.x = 90, remove.isolate = F, title.name = paste0("Up-regulated signaling in ", names(object.list)[2]), sort.by.source=T)

However, this shows communications from T Cell -> T Cell and Macrophage -> Macrophage that I don't want. How do I remove self to self communcation? I cannot figure it out with the possible parameters to the function. Thank you

shelbyhavel commented 10 months ago

I'm also having this issue, did you ever solve this?