Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

re-order RLpairs on bubble plots #168

Open
hooperj opened this issue Mar 30, 2021 · 7 comments
Open

re-order RLpairs on bubble plots #168

hooperj opened this issue Mar 30, 2021 · 7 comments

Comments

@hooperj
Copy link

hooperj commented Mar 30, 2021

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...

@sqjin
Copy link
Owner

sqjin commented Mar 31, 2021

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

@LipingChen0607
Copy link

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

@Statekeylablin
Copy link

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

@LipingChen0607
Copy link

@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
Copy link

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!

@sqjin
Copy link
Owner

sqjin commented Dec 26, 2022

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

@LipingChen0607
Copy link

LipingChen0607 commented Dec 26, 2022

@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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants