Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error of netVisual_bubble in "Identify dysfunctional signaling by using differential expression analysis" #298

Open
hjames1 opened this issue Jan 17, 2025 · 0 comments

Comments

@hjames1
Copy link

hjames1 commented Jan 17, 2025

Hello, thank you for providing such an excellent R package.

In the section “Identify dysfunctional signaling by using differential expression analysis”, I used netVisual_bubble to plot pathways upregulated in the BM group, but I noticed that some downregulated pathways were also included.

The code I used is as follows:

gg1 <- netVisual_bubble(cellchat, pairLR.use = pairLR.use.up, 
                        sources.use = grep(pattern = source_celltypes,group.new), color.text = c('blue','red'),
                        targets.use = grep(pattern = target_celltypes,group.new), 
                        comparison = c(1, 2),  
                        # max.dataset = 2,
                        angle.x = 45, remove.isolate = T,title.name = paste0("Up-regulated signaling in ", names(object.list)[2]))
gg1

gg2 <- netVisual_bubble(cellchat, pairLR.use = pairLR.use.up, 
                        sources.use = grep(pattern = source_celltypes,group.new), color.text = c('blue','red'),
                        targets.use = grep(pattern = target_celltypes,group.new), 
                        comparison = c(1, 2),  
                        max.dataset = 2,
                        angle.x = 45, remove.isolate = T,title.name = paste0("Up-regulated signaling in ", names(object.list)[2]))
gg2

gg1+gg2
Image

In your tutorial (A Bubble plot) under the (A) Bubble plot section, the code is:

pairLR.use.up = net.up[, "interaction_name", drop = F]
gg1 <- netVisual_bubble(cellchat, pairLR.use = pairLR.use.up, sources.use = 4, targets.use = c(5:11), comparison = c(1, 2),  angle.x = 90, remove.isolate = T,title.name = paste0("Up-regulated signaling in ", names(object.list)[2]))
#> Comparing communications on a merged object
pairLR.use.down = net.down[, "interaction_name", drop = F]
gg2 <- netVisual_bubble(cellchat, pairLR.use = pairLR.use.down, sources.use = 4, targets.use = c(5:11), comparison = c(1, 2),  angle.x = 90, remove.isolate = T,title.name = paste0("Down-regulated signaling in ", names(object.list)[2]))
#> Comparing communications on a merged object
gg1 + gg2

However, the comparison condition parameter max.dataset = 2 or max.dataset = 1 is missing in this code.

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

No branches or pull requests

1 participant