Closed guoxiaofa closed 2 months ago
Hi! I'm having the same error, what did you do to resolve this?
Hi! I'm having the same error, what did you do to resolve this?
Firstly, you should run the computeCommunProbPathway function, which is different from the computeCommunProb function.
Hi Suoqin Jin, Thank you for developing such wonderful tools. While following the protocol for CellChat version v2.1, I encountered an issue where cellchat@netP appears to be empty. This has led to errors when executing the code:
cellchat <- netAnalysis_computeCentrality(cellchat, slot.name = "net") netAnalysis_signalingRole_network(cellchat, signaling = pathways.show, width = 8, height = 2.5, font.size = 10)
The error is_Error in netAnalysis_signalingRole_network(cellchat, signaling = pathways.show, :
Please run
netAnalysis_computeCentrality
to compute the network centrality scores!_the code I generate cellchat object are:
cellchat <- CellChat::subsetData(cellchat) # This step is necessary even if using the whole database future::plan("multisession", workers = nmultiprocess) # do parallel cat( "Identify over-expressed ligands or receptors in one cell group ... \nThis step may run for a long time ..." ) cellchat <- CellChat::identifyOverExpressedGenes(cellchat) cellchat <- CellChat::identifyOverExpressedInteractions(cellchat) cellchat <- CellChat::computeCommunProb(cellchat,raw.use = TRUE) cellchat <- CellChat::aggregateNet(cellchat) saveRDS(cellchat,file.path(out_dir,paste(out_file_prefix,"cellchat_obj.rds",sep="")))