CellChat icon indicating copy to clipboard operation
CellChat copied to clipboard

filter the most significant ligand and receptors in netVisual_bubble

Open synatkeamsk opened this issue 10 months ago • 1 comments

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

synatkeamsk avatar Apr 17 '24 21:04 synatkeamsk

@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

sqjin avatar Apr 21 '24 10:04 sqjin