CellChat icon indicating copy to clipboard operation
CellChat copied to clipboard

Error in names(x) <- value : 'names' attribute [3] must be the same length as the vector [1]

Open meganrussell24 opened this issue 2 years ago • 3 comments

I followed the standard pipeline. This worked for one set of my data. I used the exact same code for my other datast. After the commands CM_EC_WT_cellchat <- identifyOverExpressedGenes(CM_EC_WT_cellchat) CM_EC_WT_cellchat <- identifyOverExpressedInteractions(CM_EC_WT_cellchat) , I try to run df.net_all_CM_EC_WT <- subsetCommunication(CM_EC_WT_cellchat). I get the following error: Error in names(x) <- value : 'names' attribute [3] must be the same length as the vector [1]. I have gone through trying to figure out the error and read online, but I cant figure it out.

meganrussell24 avatar Jul 01 '22 16:07 meganrussell24

@meganrussell24 Clearly, you have not run the key part of cellchat. You should at least run computeCommunProb()

sqjin avatar Jul 01 '22 22:07 sqjin

Yes, when I run computeCommunProb() I get the error: error in apply(prob, c(1, 2), by, group, sum) : dim(X) must have a positive length

meganrussell24 avatar Jul 02 '22 00:07 meganrussell24

@meganrussell24 This is not expected. You should check your input data and the [email protected]

sqjin avatar Jul 02 '22 00:07 sqjin