CellChat icon indicating copy to clipboard operation
CellChat copied to clipboard

vertex.receiver not working

Open bayankizil opened this issue 2 years ago • 3 comments

Hello,

I'm new to R, so apologies if this is a very simple question. I have a dataset with 3 cell types. When put vertex.receiver = seq(1,3), I get the error:

Error in seq.default(space.v, 0, by = -space.v/(m1 - m - 1)) : wrong sign in 'by' argument"

I also tried seq(1,2) (and lots of other combinations, including ways of indexing matrices, in that case the error I get is:

Error in if (vr[1] == vr[2]) { : missing value where TRUE/FALSE needed

What am I doing wrong? Can someone explain how vertex.receiver is supposed to work?

bayankizil avatar Jul 02 '22 09:07 bayankizil

@bayankizil you can try vertex.receiver = c(1,2) or vertex.receiver = c(2,3). you cannot use all cell clusters

sqjin avatar Jul 02 '22 22:07 sqjin

Hi, thanks for the answer. When I try either of these, I still get the error:

Error in if (vr[1] == vr[2]) { : missing value where TRUE/FALSE needed

bayankizil avatar Jul 03 '22 10:07 bayankizil

@bayankizil This is not expected. However, since you only have three clusters, I suggest you to use the circle plot

sqjin avatar Jul 04 '22 14:07 sqjin

Hi, I was wondering if you managed to make it work? I'm having the same issue

martina-morchio avatar Nov 02 '22 20:11 martina-morchio

@martina-boop How many clusters do you have?

sqjin avatar Nov 05 '22 23:11 sqjin

I'm also getting the error when I set vertex.receiver = c(5,7) and try to make the hierarchy plot. I have nine clusters total.

pathways.show <- c("SEMA3")
vertex.reveiver = c(5,7)
netVisual_aggregate(cellchat, signaling = pathways.show, layout = "hierarchy", 
                    vertex.receiver = vertex.receiver)
Error in if (vr[1] == vr[2]) { : missing value where TRUE/FALSE needed 

satkinson0115 avatar Aug 21 '23 19:08 satkinson0115