BayesPrism
BayesPrism copied to clipboard
error: could not find function "Rcgminu"
Hello,
I am running a deconvolution on R/4.2.0 using BayesPrism. I have followed your tutorial without error until the run.prism()
step:
> bp.res <- run.prism(prism = myPrism, n.cores=1)
Run Gibbs sampling...
Current time: 2022-09-26 08:22:58
Estimated time to complete: 8hrs 4mins
Estimated finishing time: 2022-09-26 16:26:16
Start run...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
Update the reference matrix ...
Explicit sfStop() is missing: stop now.
Stopping cluster
snowfall 1.84-6.2 initialized (using snow 0.4-4): parallel execution on 1 CPUs.
Error in checkForRemoteErrors(val) :
one node produced an error: could not find function "Rcgminu"
I can see that Rcgminu()
is an exported function from the BayesPrism package and is available when the package is loaded. I have also tried running this with the Rcgmin package loaded and received the same error.
Here is my session info:
> sessionInfo()
R version 4.2.0 (2022-04-22 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale:
[1] LC_COLLATE=English_Canada.utf8 LC_CTYPE=English_Canada.utf8
[3] LC_MONETARY=English_Canada.utf8 LC_NUMERIC=C
[5] LC_TIME=English_Canada.utf8
attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] BayesPrism_2.0 NMF_0.24.0 cluster_2.1.3
[4] rngtools_1.5.2 pkgmaker_0.32.2 registry_0.5-1
[7] snowfall_1.84-6.2 snow_0.4-4 DESeq2_1.36.0
[10] SummarizedExperiment_1.26.1 Biobase_2.56.0 MatrixGenerics_1.8.0
[13] matrixStats_0.62.0 GenomicRanges_1.48.0 GenomeInfoDb_1.32.2
[16] IRanges_2.30.0 S4Vectors_0.34.0 BiocGenerics_0.42.0
loaded via a namespace (and not attached):
[1] bitops_1.0-7 bit64_4.0.5 doParallel_1.0.17
[4] RColorBrewer_1.1-3 httr_1.4.4 tools_4.2.0
[7] irlba_2.3.5 utf8_1.2.2 R6_2.5.1
[10] KernSmooth_2.23-20 DBI_1.1.3 colorspace_2.0-3
[13] withr_2.5.0 tidyselect_1.1.2 bit_4.0.4
[16] compiler_4.2.0 cli_3.3.0 BiocNeighbors_1.14.0
[19] DelayedArray_0.22.0 caTools_1.18.2 scales_1.2.0
[22] genefilter_1.78.0 stringr_1.4.0 digest_0.6.29
[25] XVector_0.36.0 pkgconfig_2.0.3 sparseMatrixStats_1.8.0
[28] limma_3.52.1 fastmap_1.1.0 rlang_1.0.4
[31] rstudioapi_0.13 RSQLite_2.2.14 DelayedMatrixStats_1.18.0
[34] generics_0.1.3 BiocParallel_1.30.2 gtools_3.9.2.1
[37] dplyr_1.0.9 RCurl_1.98-1.6 magrittr_2.0.3
[40] BiocSingular_1.12.0 scuttle_1.6.3 GenomeInfoDbData_1.2.8
[43] Matrix_1.4-1 Rcpp_1.0.8.3 munsell_0.5.0
[46] fansi_1.0.3 lifecycle_1.0.1 edgeR_3.38.4
[49] stringi_1.7.6 zlibbioc_1.42.0 gplots_3.1.3
[52] plyr_1.8.7 grid_4.2.0 blob_1.2.3
[55] dqrng_0.3.0 parallel_4.2.0 crayon_1.5.1
[58] lattice_0.20-45 Biostrings_2.64.0 beachmat_2.12.0
[61] splines_4.2.0 annotate_1.74.0 KEGGREST_1.36.3
[64] locfit_1.5-9.5 metapod_1.4.0 pillar_1.8.1
[67] igraph_1.3.1 geneplotter_1.74.0 reshape2_1.4.4
[70] codetools_0.2-18 ScaledMatrix_1.4.0 XML_3.99-0.9
[73] glue_1.6.2 scran_1.24.1 png_0.1-7
[76] vctrs_0.4.1 foreach_1.5.2 gtable_0.3.0
[79] purrr_0.3.4 assertthat_0.2.1 cachem_1.0.6
[82] ggplot2_3.3.6 BinfTools_0.0.0.9000 gridBase_0.4-7
[85] rsvd_1.0.5 xtable_1.8-4 survival_3.3-1
[88] SingleCellExperiment_1.18.0 tibble_3.1.7 iterators_1.0.14
[91] AnnotationDbi_1.58.0 memoise_2.0.1 statmod_1.4.37
[94] bluster_1.6.0 ellipsis_0.3.2
Please let me know if you need any other information. Any help would be greatly appreciated.
Thank you for your interest in our work.
Please try using n.cores>1 for the time being. I will fix the error soon. Thank you for reporting the error.
Best,
Tinyi
On Wed, Sep 28, 2022 at 10:45 AM kevincjnixon @.***> wrote:
Hello,
I am running a deconvolution on R/4.2.0 using BayesPrism. I have followed your tutorial without error until the run.prism() step:
bp.res <- run.prism(prism = myPrism, n.cores=1) Run Gibbs sampling... Current time: 2022-09-26 08:22:58 Estimated time to complete: 8hrs 4mins Estimated finishing time: 2022-09-26 16:26:16 Start run... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 Update the reference matrix ... Explicit sfStop() is missing: stop now.
Stopping cluster
snowfall 1.84-6.2 initialized (using snow 0.4-4): parallel execution on 1 CPUs.
Error in checkForRemoteErrors(val) : one node produced an error: could not find function "Rcgminu"
I can see that Rcgminu() is an exported function from the BayesPrism package and is available when the package is loaded. I have also tried running this with the Rcgmin package loaded and received the same error.
Here is my session info:
sessionInfo() R version 4.2.0 (2022-04-22 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale: [1] LC_COLLATE=English_Canada.utf8 LC_CTYPE=English_Canada.utf8 [3] LC_MONETARY=English_Canada.utf8 LC_NUMERIC=C [5] LC_TIME=English_Canada.utf8
attached base packages: [1] stats4 stats graphics grDevices utils datasets methods base
other attached packages: [1] BayesPrism_2.0 NMF_0.24.0 cluster_2.1.3 [4] rngtools_1.5.2 pkgmaker_0.32.2 registry_0.5-1 [7] snowfall_1.84-6.2 snow_0.4-4 DESeq2_1.36.0 [10] SummarizedExperiment_1.26.1 Biobase_2.56.0 MatrixGenerics_1.8.0 [13] matrixStats_0.62.0 GenomicRanges_1.48.0 GenomeInfoDb_1.32.2 [16] IRanges_2.30.0 S4Vectors_0.34.0 BiocGenerics_0.42.0
loaded via a namespace (and not attached): [1] bitops_1.0-7 bit64_4.0.5 doParallel_1.0.17 [4] RColorBrewer_1.1-3 httr_1.4.4 tools_4.2.0 [7] irlba_2.3.5 utf8_1.2.2 R6_2.5.1 [10] KernSmooth_2.23-20 DBI_1.1.3 colorspace_2.0-3 [13] withr_2.5.0 tidyselect_1.1.2 bit_4.0.4 [16] compiler_4.2.0 cli_3.3.0 BiocNeighbors_1.14.0 [19] DelayedArray_0.22.0 caTools_1.18.2 scales_1.2.0 [22] genefilter_1.78.0 stringr_1.4.0 digest_0.6.29 [25] XVector_0.36.0 pkgconfig_2.0.3 sparseMatrixStats_1.8.0 [28] limma_3.52.1 fastmap_1.1.0 rlang_1.0.4 [31] rstudioapi_0.13 RSQLite_2.2.14 DelayedMatrixStats_1.18.0 [34] generics_0.1.3 BiocParallel_1.30.2 gtools_3.9.2.1 [37] dplyr_1.0.9 RCurl_1.98-1.6 magrittr_2.0.3 [40] BiocSingular_1.12.0 scuttle_1.6.3 GenomeInfoDbData_1.2.8 [43] Matrix_1.4-1 Rcpp_1.0.8.3 munsell_0.5.0 [46] fansi_1.0.3 lifecycle_1.0.1 edgeR_3.38.4 [49] stringi_1.7.6 zlibbioc_1.42.0 gplots_3.1.3 [52] plyr_1.8.7 grid_4.2.0 blob_1.2.3 [55] dqrng_0.3.0 parallel_4.2.0 crayon_1.5.1 [58] lattice_0.20-45 Biostrings_2.64.0 beachmat_2.12.0 [61] splines_4.2.0 annotate_1.74.0 KEGGREST_1.36.3 [64] locfit_1.5-9.5 metapod_1.4.0 pillar_1.8.1 [67] igraph_1.3.1 geneplotter_1.74.0 reshape2_1.4.4 [70] codetools_0.2-18 ScaledMatrix_1.4.0 XML_3.99-0.9 [73] glue_1.6.2 scran_1.24.1 png_0.1-7 [76] vctrs_0.4.1 foreach_1.5.2 gtable_0.3.0 [79] purrr_0.3.4 assertthat_0.2.1 cachem_1.0.6 [82] ggplot2_3.3.6 BinfTools_0.0.0.9000 gridBase_0.4-7 [85] rsvd_1.0.5 xtable_1.8-4 survival_3.3-1 [88] SingleCellExperiment_1.18.0 tibble_3.1.7 iterators_1.0.14 [91] AnnotationDbi_1.58.0 memoise_2.0.1 statmod_1.4.37 [94] bluster_1.6.0 ellipsis_0.3.2
Please let me know if you need any other information. Any help would be greatly appreciated.
— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/BayesPrism/issues/18, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHS75RLLL4SZMQNKH2I3WARKXDANCNFSM6AAAAAAQX3NY3A . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Dear user,
I tried to reproduce the error using the tutorial data (using n.cores=1), but I did not see this error. Do you mind if sharing your prism object with me for further troubleshooting? You can downsize the prism object that reproduces your error if needed.
Best,
Tinyi
On Wed, Sep 28, 2022 at 10:45 AM kevincjnixon @.***> wrote:
Hello,
I am running a deconvolution on R/4.2.0 using BayesPrism. I have followed your tutorial without error until the run.prism() step:
bp.res <- run.prism(prism = myPrism, n.cores=1) Run Gibbs sampling... Current time: 2022-09-26 08:22:58 Estimated time to complete: 8hrs 4mins Estimated finishing time: 2022-09-26 16:26:16 Start run... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 Update the reference matrix ... Explicit sfStop() is missing: stop now.
Stopping cluster
snowfall 1.84-6.2 initialized (using snow 0.4-4): parallel execution on 1 CPUs.
Error in checkForRemoteErrors(val) : one node produced an error: could not find function "Rcgminu"
I can see that Rcgminu() is an exported function from the BayesPrism package and is available when the package is loaded. I have also tried running this with the Rcgmin package loaded and received the same error.
Here is my session info:
sessionInfo() R version 4.2.0 (2022-04-22 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale: [1] LC_COLLATE=English_Canada.utf8 LC_CTYPE=English_Canada.utf8 [3] LC_MONETARY=English_Canada.utf8 LC_NUMERIC=C [5] LC_TIME=English_Canada.utf8
attached base packages: [1] stats4 stats graphics grDevices utils datasets methods base
other attached packages: [1] BayesPrism_2.0 NMF_0.24.0 cluster_2.1.3 [4] rngtools_1.5.2 pkgmaker_0.32.2 registry_0.5-1 [7] snowfall_1.84-6.2 snow_0.4-4 DESeq2_1.36.0 [10] SummarizedExperiment_1.26.1 Biobase_2.56.0 MatrixGenerics_1.8.0 [13] matrixStats_0.62.0 GenomicRanges_1.48.0 GenomeInfoDb_1.32.2 [16] IRanges_2.30.0 S4Vectors_0.34.0 BiocGenerics_0.42.0
loaded via a namespace (and not attached): [1] bitops_1.0-7 bit64_4.0.5 doParallel_1.0.17 [4] RColorBrewer_1.1-3 httr_1.4.4 tools_4.2.0 [7] irlba_2.3.5 utf8_1.2.2 R6_2.5.1 [10] KernSmooth_2.23-20 DBI_1.1.3 colorspace_2.0-3 [13] withr_2.5.0 tidyselect_1.1.2 bit_4.0.4 [16] compiler_4.2.0 cli_3.3.0 BiocNeighbors_1.14.0 [19] DelayedArray_0.22.0 caTools_1.18.2 scales_1.2.0 [22] genefilter_1.78.0 stringr_1.4.0 digest_0.6.29 [25] XVector_0.36.0 pkgconfig_2.0.3 sparseMatrixStats_1.8.0 [28] limma_3.52.1 fastmap_1.1.0 rlang_1.0.4 [31] rstudioapi_0.13 RSQLite_2.2.14 DelayedMatrixStats_1.18.0 [34] generics_0.1.3 BiocParallel_1.30.2 gtools_3.9.2.1 [37] dplyr_1.0.9 RCurl_1.98-1.6 magrittr_2.0.3 [40] BiocSingular_1.12.0 scuttle_1.6.3 GenomeInfoDbData_1.2.8 [43] Matrix_1.4-1 Rcpp_1.0.8.3 munsell_0.5.0 [46] fansi_1.0.3 lifecycle_1.0.1 edgeR_3.38.4 [49] stringi_1.7.6 zlibbioc_1.42.0 gplots_3.1.3 [52] plyr_1.8.7 grid_4.2.0 blob_1.2.3 [55] dqrng_0.3.0 parallel_4.2.0 crayon_1.5.1 [58] lattice_0.20-45 Biostrings_2.64.0 beachmat_2.12.0 [61] splines_4.2.0 annotate_1.74.0 KEGGREST_1.36.3 [64] locfit_1.5-9.5 metapod_1.4.0 pillar_1.8.1 [67] igraph_1.3.1 geneplotter_1.74.0 reshape2_1.4.4 [70] codetools_0.2-18 ScaledMatrix_1.4.0 XML_3.99-0.9 [73] glue_1.6.2 scran_1.24.1 png_0.1-7 [76] vctrs_0.4.1 foreach_1.5.2 gtable_0.3.0 [79] purrr_0.3.4 assertthat_0.2.1 cachem_1.0.6 [82] ggplot2_3.3.6 BinfTools_0.0.0.9000 gridBase_0.4-7 [85] rsvd_1.0.5 xtable_1.8-4 survival_3.3-1 [88] SingleCellExperiment_1.18.0 tibble_3.1.7 iterators_1.0.14 [91] AnnotationDbi_1.58.0 memoise_2.0.1 statmod_1.4.37 [94] bluster_1.6.0 ellipsis_0.3.2
Please let me know if you need any other information. Any help would be greatly appreciated.
— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/BayesPrism/issues/18, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHS75RLLL4SZMQNKH2I3WARKXDANCNFSM6AAAAAAQX3NY3A . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi Tinyi,
Thank you for your response. I get a similar error when I use n.cores>1 (function sample.Z.theta_n not found).
I am using this on the tutorial data that is supplied with the repository. I think there must have been an installation error on my end. I have tried re-installing the package and will continue to look into it.
Thank you for your help.
Best,
Kevin
Hi Tinyi,
I have been working on this, and I think I found my problem - at least for the run with multiple cores. I believe Windows may behave differently when running processes in parallel than on UNIX/linux systems. I forked the repository and added:
environment(sample.Z.theta_n)<-globalenv() environment(sample.theta_n)<-globalenv() environment(rdirichlet)<-globalenv() sfExport("phi", "X", "alpha", "gibbs.idx", "seed", "compute.elbo", "sample.Z.theta_n","sample.theta_n","rdirichlet")
to the run.gibbs.refPhi()
function in 'run_gibbs.R'
By exporting the functions sample.Z.theta_n()
, sample.theta.n()
, and rdirichlet()
to the global environment, and then from there to each cluster generated by snowlfake, the functions were available in each cpu node avoiding the errors.
I believe this may only be an issue for Windows as I have had colleagues successfully run this on Linux environments.
Hi Kevin. Thank you so much for your suggestions!
Hi Kevin,
This is very possible, as I have not tested on windows machines. Thank you very much for your feedback.
Best,
Tinyi
On Mon, Oct 3, 2022 at 10:17 AM kevincjnixon @.***> wrote:
Hi Tinyi,
I have been working on this, and I think I found my problem - at least for the run with multiple cores. I believe Windows may behave differently when running processes in parallel than on UNIX/linux systems. I forked the repository and added:
environment(sample.Z.theta_n)<-globalenv() environment(sample.theta_n)<-globalenv() environment(rdirichlet)<-globalenv() sfExport("phi", "X", "alpha", "gibbs.idx", "seed", "compute.elbo", "sample.Z.theta_n","sample.theta_n","rdirichlet")
to the run.gibbs.refPhi() function in 'run_gibbs.R'
By exporting the functions sample.Z.theta_n() , sample.theta.n(), and rdirichlet() to the global environment, and then from there to each cluster generated by snowlfake, the functions were available in each cpu node avoiding the errors.
I believe this may only be an issue for Windows as I have had colleagues successfully run this on Linux environments.
— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/BayesPrism/issues/18#issuecomment-1265511171, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHSZAEY7QT6ZWE6GJAZLWBLTEZANCNFSM6AAAAAAQX3NY3A . You are receiving this because you commented.Message ID: @.***>