CellChat
CellChat copied to clipboard
re-order RLpairs on bubble plots
This is a terrific package. It is so smart about signaling, and about visualizations that reduce the HUGE amount of data into intuitive chunks. This works beautifully
netVisual_bubble(noseChat, sources.use = c(1,12,13,14), targets.use = c(3,5,21,22), remove.isolate = FALSE)
Now I want to reorder the LRpairs (grouping similar patterns together) to make it pretty for publication. I tried using the pairLR.use flag, building a dataframe of LRpairs in the order I wanted. But it returned a plot with the pairs in the same order as the original plot.
netVisual_bubble(noseChat, sources.use = c(1,12,13,14), targets.use = c(3,5,21,22), remove.isolate = FALSE, pairLR.use = pair4plot)
Since this did NOT work, is there a way of re-ordering the RLpairs on these plots?
PS. I CAN reorder the cell pairs (somewhat) by changing the order in the sources.use and targets.use flags...
@hooperj I will look into the codes and try to modify it in next two days.
Hi~ I have same question. How could we reorder LRs when using netVisual_bubble? Thanks a lot!
This is a terrific package. It is so smart about signaling, and about visualizations that reduce the HUGE amount of data into intuitive chunks. This works beautifully
netVisual_bubble(noseChat, sources.use = c(1,12,13,14), targets.use = c(3,5,21,22), remove.isolate = FALSE)
Now I want to reorder the LRpairs (grouping similar patterns together) to make it pretty for publication. I tried using the pairLR.use flag, building a dataframe of LRpairs in the order I wanted. But it returned a plot with the pairs in the same order as the original plot.
netVisual_bubble(noseChat, sources.use = c(1,12,13,14), targets.use = c(3,5,21,22), remove.isolate = FALSE, pairLR.use = pair4plot)
Since this did NOT work, is there a way of re-ordering the RLpairs on these plots?
PS. I CAN reorder the cell pairs (somewhat) by changing the order in the sources.use and targets.use flags...
Hi, I've met a problem that when I reordered the cell pairs by changing the order in source.use and target.use, it failed and ordered as the initial letter rank. Could you explain it for me? Thanks a lot
@hooperj I will look into the codes and try to modify it in next two days.
Hi~ I have same problem. How could we reorder LRs when using netVisual_bubble? Thanks a lot!
I still have the problem. Could you tell me how to reorder the cell pairs in a merge cellchat object and how to reorder the L-R pair in netVisual_bubble, thank you very much!
@LipingChen0607 You should be able to fix the order of L-R pairs by providing pairLR.use
when running this function.
@sqjin When I provide pairLR. use, the LRs order in the plot is still according to the first letter of LRs rather than the order in the dataframe. How should I adjust it? Thanks a lot!
netVisual_bubble(cellchat_merge, sources.use = c(1:8), targets.use = 1, pairLR.use= myLRpairs, comparison = c(1,2,3,4,5), angle.x = 90, color.heatmap = "viridis", n.colors = 3, remove.isolate = FALSE, line.on=TRUE, grid.on = FALSE)

