A problem when using "myidentifyCommunicationPatterns"
beyond1980 opened this issue · 20 comments
Hi,
Thanks for developing this user-friendly tool.
I have problem that I can't go through when running:
cellchat <- identifyCommunicationPatterns(cellchat, pattern = "outgoing", k = nPatterns)
Error in (new("standardGeneric", .Data = function (x) :
unused arguments (model = list("NMFstd", 3, 0), method = "nndsvd")
Called from: do.call(getGeneric("seed"), c(list(x = x, model = init, method = seed.method),
parameters.seed))
Can you kindly help me with this problem? thank you very much!
@beyond1980 I think this is the issue of the dependent package 'NMF'. Can you reinstall this package by install.packages("NMF")
Thank you very much for your help!
@beyond1980 Hi beyond1980, I was wondering if you have figured out this issue? I am getting the same problem and I tried to re-install NMF. But I am still failed to run this step. Could you please tell me which version of NMF you installed? I install NMF with the lasted version 0.23.0. Hope to get any help and thanks in advance!
@Dongxu-Zheng Can you try to install this package by
install.packages("NMF")
or
install.packages("NMF", repos="http://R-Forge.R-project.org")
or
Install repotools (need to be done only once)
source('http://renozao.github.io/repotools/install.R')
library(repotools)
latest development version
install.pkgs('NMF')
@sqjin Thank you for your reply. Unfortunately, all of the solutions are not working for me.
First, I tried to use install.packages to install NMF
install.packages("NMF")
I can install NMF successfully and I can load CellChat, but I am not able to run identifyCommunicationPatterns. Just got the same error.
Then, I tried to use install.packages("NMF", repos="http://R-Forge.R-project.org")
. I got a warning like this
Warning in install.packages :
package ‘NMF’ is not available (for R version 3.6.3)
It seems like my R version is not suitable to NMF from R-Forge.
So I tried to install NMF with the latest version number by running this:
install.packages("https://cran.r-project.org/src/contrib/NMF_0.23.0.tar.gz", repo = NULL, type = "source")
I installed NMF with the latest version NMF_0.23.0 but I am still failed to run identifyCommunicationPatterns.
For the repotools, I am not able to install it and an ERROR reported as:
Error in findpack(package, lib.loc) :
there is no package called 'repotools'
It was a bit of tricky...I am thinking about if my R base version causes the issue but actually I can install the lasted NMF with R.3.6.3. Based on the ERROR I got, things like I use unnecessary arguments. Maybe I should go to find the version of NMF you use.
Here is my session info:
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_2.3.0 usethis_1.6.1
loaded via a namespace (and not attached):
[1] rstan_2.19.3 tinytex_0.24 tidyselect_1.1.0 xfun_0.15
[5] remotes_2.1.1 purrr_0.3.3 listenv_0.8.0 colorspace_1.4-1
[9] vctrs_0.3.1 generics_0.0.2 testthat_2.3.2 stats4_3.6.3
[13] loo_2.3.0 yaml_2.2.1 rlang_0.4.6 pkgbuild_1.0.8
[17] pillar_1.4.6 glue_1.4.1 withr_2.2.0 sessioninfo_1.1.1
[21] matrixStats_0.55.0 lifecycle_0.2.0 munsell_0.5.0 gtable_0.3.0
[25] future_1.18.0 codetools_0.2-16 memoise_1.1.0 inline_0.3.15
[29] knitr_1.29 callr_3.4.3 ps_1.3.2 parallel_3.6.3
[33] curl_4.3 fansi_0.4.1 Rcpp_1.0.5 backports_1.1.5
[37] scales_1.1.1 desc_1.2.0 pkgload_1.1.0 RcppParallel_5.0.2
[41] StanHeaders_2.21.0-5 fs_1.4.2 gridExtra_2.3 ggplot2_3.3.2
[45] digest_0.6.25 processx_3.4.2 dplyr_1.0.0 rprojroot_1.3-2
[49] grid_3.6.3 cli_2.0.2 tools_3.6.3 magrittr_1.5
[53] tibble_3.0.1 crayon_1.3.4 pkgconfig_2.0.3 ellipsis_0.3.0
[57] prettyunits_1.1.1 assertthat_0.2.1 rstudioapi_0.11 R6_2.4.1
[61] globals_0.12.5 compiler_3.6.3
@sqjin Hi, just give a quick update.
I update my R up to 4.0.2 and install CellChat. I am still getting the same ERROR. And I use all three methods to re-install NMF and they are not working for me...
After trying all the above methods, also got the same error.
macOS Catalina v10.15.4. R version: 4.0.2
@Dongxu-Zheng @jipeifeng I just realized that the NMF package has been updated by the authors. Please install the version I used by devtools::install_github("sqjin/NMF")
. Please let me know if this works.
@sqjin @jipeifeng Hi guys, good news for updating. I have figured out this issue. Just use devtools::install_github("renozao/NMF@devel")
to install NMF with developing version and then run this step successfully. The problem is not caused by R version. I have tested it in R.3.6 and R.4.0 and everything is working well. In addition, you might need to update pkgmaker
with latest version 0.31.1.
After installing NMF with developing version, package.version("NMF")
shows 0.30.1.
Enjoy cell chatting!
@Dongxu-Zheng Thank you so much for figuring it out!!!
@sqjin Here are a few ERRORS when I was running the whole workflow.
One is coming up when I use netAnalysis_river
function. It reported Error: Can't find stat called "stratum"
. I change the code of this function by replacing requireNamespace("ggalluvial")
with library("ggalluvial")
. It seems you do not want to load ggalluvial
package. I am not sure if my way is correct but I can use this function now and create the Sankey plot.
Another issue is about not finding umap-learn
when I run netEmbedding
. The ERROR is reported as Cannot find UMAP, please install through pip (e.g. pip install umap-learn) balabala..
. The way to figure this issue out is to install reticulate
and umap
packages and then run reticulate::py_install(packages ='umap-learn')
in order to install umap-learn
. Maybe umap
package is not required.
I didn't see others open the same/similar issues so I just left my comments here. Hope this would be helpful.
Thanks @Dongxu-Zheng . You do need to explicitly library ggalluvial when loading CellChat.
Hi @Aby-GGG , have you tried devtools::install_github("renozao/NMF@devel")
as mentioned above?
@sqjin I installed NMF with the latest version NMF_0.30.1 but I am still failed to run identifyCommunicationPatterns and myidentifyCommunicationPatterns
nPatterns = 3
cellchat <- identifyCommunicationPatterns(cellchat, pattern = "outgoing", k = nPatterns)
Error in (new("standardGeneric", .Data = function (x) :
unused arguments (model = list("NMFstd", 3, 0), method = "nndsvd")
netAnalysis_river(cellchat, pattern = "outgoing")
Error in seq.default(1, nPatterns * 2, by = 2) :
wrong sign in 'by' argument
netAnalysis_dot(cellchat, pattern = "outgoing")
Error in fix.by(by.x, x) : 'by' must specify a uniquely valid column
Can you kindly help me with this problem? thank you very much!
One problem with installing devtools::install_github("renozao/NMF@devel")
is that pkgmaker throwing an R version error.
Try
Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS=TRUE)
and devtools::install_github("renozao/NMF@devel")
should work.
Hi @bjstewart1 , thanks for sharing this. An issue bothers many users!!
Browse[1]> package.version("NMF")
[1] "0.30.1"
Browse[1]> cellchat <- myidentifyCommunicationPatterns(cellchat, pattern = "outgoing", k = nPatterns)
Error during wrapup: unused arguments (model = list("NMFstd", 5, 0), method = "nndsvd")
Error: no more error handlers available (recursive errors?); invoking 'abort' restart
The same question still can not be solved,if you can give help ,i will be grateful.
Browse[1]> package.version("NMF")
[1] "0.30.1"
Browse[1]> cellchat <- myidentifyCommunicationPatterns(cellchat, pattern = "outgoing", k = nPatterns)
Error during wrapup: unused arguments (model = list("NMFstd", 5, 0), method = "nndsvd")
Error: no more error handlers available (recursive errors?); invoking 'abort' restartThe same question still can not be solved,if you can give help ,i will be grateful.
Similar problem unsolved (and is strange that it was OK across previous runs but crashed for now). The obj is some 120838 cells x 60662 genes. @sqjin