CellChat
CellChat copied to clipboard
Error when using netVisual_embeddingZoomIn with merged object
Good day!
I am having problems magnifying the view of each pathway group using netVisual_embeddingZoomIn
. When running netVisual_embeddingZoomIn(cellchat, type = "structural")
i get the error below:
Error in base::colSums(x, na.rm = na.rm, dims = dims, ...): 'x' must be an array of at least two dimensions
Traceback:
1. netVisual_embeddingZoomIn(cellchat, type = "structural")
2. which(colSums(similarity) == 1)
3. colSums(similarity)
4. colSums(similarity)
5. base::colSums(x, na.rm = na.rm, dims = dims, ...)
6. stop("'x' must be an array of at least two dimensions")
I can visualize the clustered pathways using netVisual_embeddingPairwise
. Do not understand why I am having that error.
Thanks in advance!
@ccruizm Can you try to run the source codes of netVisual_embeddingZoomIn
to figure out the reason. I have no idea except that I can replicate your error.
I also have this error. Could you give me some advice to solve it? Thanks a lot!
@LipingChen0607 Do you have this issue when running the example data? If not, there may be a bug of this code and I can check it if you share me your cellchat object.
I have the error as well and I found the problem, for pairwise comparison there is netVisual_embeddingPairwiseZoomIn - netVisual_embeddingZoomIn uses 'comparison <- "single"' and that comparison is not in the merged objects.
I also have the same problem. The merged cellchat object have this error. A single cellchat object runs fine. How to solve it?