Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

there is no package called ‘CellChat’ #2

Closed
zh-Bian opened this issue Jul 27, 2020 · 8 comments
Closed

there is no package called ‘CellChat’ #2

zh-Bian opened this issue Jul 27, 2020 · 8 comments

Comments

@zh-Bian
Copy link

zh-Bian commented Jul 27, 2020

Hello, when I used the function computeCommunProb(), it always reported an error: there is no package called ‘CellChat’. Could you give me some advice to solve the problem? Thank you! @sqjin

@sqjin
Copy link
Owner

sqjin commented Jul 27, 2020

@zh-Bian Can you show me several lines of codes before you run this function and how you run this function?

@zh-Bian
Copy link
Author

zh-Bian commented Jul 27, 2020

I followed the process of 'Walkthrough - CellChat analysis of cell-cell communication in mouse skin wounds'. Here are my codes.

cellchat <- subsetData(cellchat) # subset the expression data of signaling genes for saving computation cost
future::plan("multiprocess", workers = 15) # do parallel
cellchat <- identifyOverExpressedGenes(cellchat)
cellchat <- identifyOverExpressedInteractions(cellchat)
cellchat <- projectData(cellchat, PPI.mouse) #human/mouse

library(CellChat)

cellchat <- computeCommunProb(cellchat)
cellchat <- computeCommunProbPathway(cellchat)
cellchat <- aggregateNet(cellchat)

When it run to 'cellchat <- computeCommunProb(cellchat) ', it failed with " 'there is no package called ‘CellChat’ ". Then I used the source code to test and I found the error occured in function computeExpr_complex(). @sqjin

data.complex = my.sapply(
X = 1:nrow(Rsubunits),
FUN = function(x) {
RsubunitsV <- unlist(Rsubunits[x,], use.names = F)
RsubunitsV <- RsubunitsV[RsubunitsV != ""]
return(geometricMean(data.use[RsubunitsV,]))
}
)

@sqjin
Copy link
Owner

sqjin commented Jul 27, 2020

@zh-Bian I have no idea on this error for now. I searched the similar issue online, and you might can try library.path <- .libPaths() library("cellchat", lib.loc = library.path). Please check here. If it does not work, can you share your cellchat object with me or your colleague?

@sqjin
Copy link
Owner

sqjin commented Jul 27, 2020

@zh-Bian library.path <- .libPaths(); library("CellChat", lib.loc = library.path)

@zh-Bian
Copy link
Author

zh-Bian commented Jul 30, 2020

Hello, Thank you for your advice. I tried your method but it didn't work. And I noticed an interesting detail: when I first open my Rstudio, 'cellchat <- computeCommunProb(cellchat)' works fine, however the second is the same wrong. I think whether the function needs to access some resources online, so it sometimes works and sometimes not. @sqjin

@sqjin
Copy link
Owner

sqjin commented Jul 30, 2020

@zh-Bian I will take a look and fix this issue. For now, please just run this function only one time.

@zh-Bian
Copy link
Author

zh-Bian commented Jul 31, 2020

OK. The way for me to use the package is interesting, and the package is useful. Thank you very much for answering my questions.

@sqjin
Copy link
Owner

sqjin commented Jul 31, 2020

@zh-Bian Hello, just let you know that I have no issue to rerun cellchat <- computeCommunProb(cellchat) in the same Rstudio.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants