jinworks/CellChat

Data exported from rankNet do not correspond to the plot info

Opened this issue · 2 comments

Hey there

When comparing two datasets, I am having some issues exporting and understanding the data behind the rankNet() plots.

I ran it for specific cell pairs in a merged cellchat object, example:
source = 'Astro-Homeo' # define source
target = 'Astro-Reactive' # define target
gg1 <- rankNet(cellchat, mode = "comparison", stacked = T, do.stat = T, sources.use = source, targets.use = target)

Next, to export the data - I am interested in the relative information flow values and p-values from Wicoxon test:
gg1$data

What I get are:

contribution.relative.1: values ranging from 0 to 'Inf', that do not correspond to the values ploted as Relative information flow.
What does this value mean? How does it relate to the values ploted by rankNet(cellchat, mode = "comparison", stacked = T)?

p-values: only zero values, although the plot displays both significant and non-significant differences.
Do you have any thoughts on why the p-values in the gg1 plot and the gg1$data do not seem to match?

Thank you :)

Also, I am having a similar issue with the p-values of the gg1$data from netVisual_bubble() analysis:
gg1 <- netVisual_bubble(cellchat, sources.use = idents[1], targets.use = idents, comparison = c(1, 2), max.dataset = 2, title.name, angle.x = 45, remove.isolate = T)
I get pval=3 for all comparisons in the dataframe, although the plot shows me multiple statistical differences.

Also, I am having a similar issue with the p-values of the gg1$data from netVisual_bubble() analysis: gg1 <- netVisual_bubble(cellchat, sources.use = idents[1], targets.use = idents, comparison = c(1, 2), max.dataset = 2, title.name, angle.x = 45, remove.isolate = T) I get pval=3 for all comparisons in the dataframe, although the plot shows me multiple statistical differences.

Same issue.