CellChat icon indicating copy to clipboard operation
CellChat copied to clipboard

re-order RLpairs on bubble plots

Open hooperj opened this issue 3 years ago • 3 comments

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 avatar Mar 30 '21 19:03 hooperj

@hooperj I will look into the codes and try to modify it in next two days.

sqjin avatar Mar 31 '21 07:03 sqjin

Hi~ I have same question. How could we reorder LRs when using netVisual_bubble? Thanks a lot!

LipingChen0607 avatar Aug 26 '22 01:08 LipingChen0607

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

Statekeylablin avatar Aug 29 '22 02:08 Statekeylablin

@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!

LipingChen0607 avatar Dec 05 '22 07:12 LipingChen0607

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 avatar Dec 25 '22 06:12 LipingChen0607

@LipingChen0607 You should be able to fix the order of L-R pairs by providing pairLR.use when running this function.

sqjin avatar Dec 26 '22 04:12 sqjin

@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)

截屏2022-12-26 下午2 17 00 截屏2022-12-26 下午2 17 18

LipingChen0607 avatar Dec 26 '22 06:12 LipingChen0607