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
219 stars 30 forks source link

filter the most significant ligand and receptors in netVisual_bubble #137

Open synatkeamsk opened 3 months ago

synatkeamsk commented 3 months ago

Dear professor sqjin,

I run netVisual_bubble and netVisual_chord_gene functions of cellchat to visualize cell communication, but got too many receptor/ligand interaction. I still would like to cover all signalling pathways, but I wanted to keep only the most maximum communication probability. I tried thresh argument, but did not work. Kindly review the attach.

netVisual_bubble(cellchat.first.art, sources.use = 3, targets.use = c(0:21),
                  thresh = 0.05, remove.isolate = FALSE) 
netVisual_chord_gene(cellchat.first.art, 
                          sources.use = 3, 
                          targets.use = c(0:21), 
                          lab.cex = 0.7,
                          legend.pos.y = 0,
                     small.gap = 2)

Hope you could help!

Kind Regards,

Synat

cellchat cellchat 2

sqjin commented 3 months ago

@synatkeamsk Here is one possible solution: gg <- netVisual_bubble(cellchat.first.art, sources.use = 3, targets.use = c(0:21), thresh = 0.05, remove.isolate = FALSE) df <- gg$data Then you can filter out the weak interactions from 'df' and run the function again as follows gg <- netVisual_bubble(cellchat.first.art, pairLR.use = df.filtered, sources.use = 3, targets.use = c(0:21), thresh = 0.05, remove.isolate = FALSE)

You can also change the 'signaling' when running netVisual_bubble