jinworks / CellChat

R toolkit for inference, visualization and analysis of cell-cell communication from single-cell and spatially resolved transcriptomics
GNU General Public License v3.0
208 stars 25 forks source link

rankNet group color in plot is different from group column in ggplot object #161

Open bansalvi opened 1 month ago

bansalvi commented 1 month ago

Hi Jin,

Thanks for the nice package. I just noticed that in the bar plots, the color and order looks fine. But in the ggplot object i.e. e.g. gg1$data, the group values are other way round. Do you also see something like this? Also, can we also use signaling.exclude = "MIF" for rankNet? I was wondering is you recommend to exclude this signalling pathway in all datasets mostly?

Best wishes, VB

sqjin commented 1 month ago

@bansalvi I just checked the "gg$data", and observed the same information as you. I just have no idea on this.

For the rankNet, you can provide signaling as a parameter. For the "MIF" signaling, if it dominate your results and you are interested in this signaling, and then you can exclude it in the analysis.

bansalvi commented 1 month ago

Thanks Jin. If I understand correctly, may be the "contribution" column in the "gg$data" defines 0 contribution, therefore the group column print otherway round.