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
236 stars 33 forks source link

cell types are not in same order from left to right in both datasets when comparing two group of samples #139

Closed tumorscholar closed 3 weeks ago

tumorscholar commented 4 months ago

I am comparing two groups of samples using Comparison analysis of multiple datasets using CellChat vignette. While using the "(B) Compare outgoing (or incoming) signaling patterns associated with each cell population" function I am getting image

Could you please help What could be the reason the order of cell types from left to right is not matching in X axis? This is further messing up with downstream analysis.

Thank you

TdzBAS commented 4 months ago

I am facing the same issue.

TdzBAS commented 3 months ago

@sqjin do you have a fix for this?

tumorscholar commented 3 weeks ago

I managed to solve this by

  1. using the same no of clusters in both objects and,
  2. sorting/arranging the cluster/celltype in same order in the Seurat object before subjecting them to CellChat