smorabit / hdWGCNA

High dimensional weighted gene co-expression network analysis
https://smorabit.github.io/hdWGCNA/
Other
315 stars 31 forks source link

allowWGCNAThreads() use instead of enableWGCNAThreads() for RStudio, MacOSX #255

Open bpyenson opened 1 month ago

bpyenson commented 1 month ago

Hi,

Thanks for creating such a great tool! And congratulations on defending your PhD!

Just a note that using my settings (described below), I continually got an error with TestSoftPowers function.

This bug has been reported here for WGCNA (vanilla type referred to in the tutorial): https://www.biostars.org/p/122349/

Solution: Basically, instead of enableWGCNAThreads(), use allowWGCNAThreads()

For code described below, output and error was: pickSoftThreshold: will use block size 5244. pickSoftThreshold: calculating connectivity for given powers... ..working on genes 1 through 5244 of 5244 Error in datk[c(startG:endG), ] = foreach(t = actualThreads, .combine = rbind) %dopar% : number of items to replace is not a multiple of replacement length In addition: Warning message: In mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed, : scheduled cores 1, 2, 3, 4, 5, 6, 7, 8 did not deliver results, all values of the jobs will be affected

# Test different soft powers:
brainonly_2 <- TestSoftPowers(
  brainonly_2,
  networkType = 'signed hybrid' # you can also use "unsigned" or "signed hybrid"
)

R session info R version 4.3.3 (2024-02-29) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Sonoma 14.4.1

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Toronto tzcode source: internal

attached base packages: [1] stats4 stats graphics grDevices utils datasets methods
[8] base

other attached packages: [1] hdWGCNA_0.3.01 igraph_2.0.3
[3] ggrepel_0.9.5 harmony_1.2.0
[5] Rcpp_1.0.12 WGCNA_1.72-5
[7] fastcluster_1.2.6 dynamicTreeCut_1.63-1
[9] lubridate_1.9.3 forcats_1.0.0
[11] stringr_1.5.1 purrr_1.0.2
[13] readr_2.1.5 tidyr_1.3.1
[15] tibble_3.2.1 tidyverse_2.0.0
[17] celda_1.18.1 SingleCellExperiment_1.24.0 [19] SummarizedExperiment_1.32.0 Biobase_2.62.0
[21] GenomicRanges_1.54.1 GenomeInfoDb_1.38.8
[23] IRanges_2.36.0 S4Vectors_0.40.2
[25] BiocGenerics_0.48.1 MatrixGenerics_1.14.0
[27] matrixStats_1.2.0 sctransform_0.4.1
[29] umap_0.2.10.0 Matrix_1.6-5
[31] viridis_0.6.5 viridisLite_0.4.2
[33] patchwork_1.2.0 cowplot_1.1.3
[35] ggplot2_3.5.0 magrittr_2.0.3
[37] dplyr_1.1.4 Seurat_5.0.3
[39] SeuratObject_5.0.1 sp_2.1-3

loaded via a namespace (and not attached): [1] fs_1.6.3 spatstat.sparse_3.0-3
[3] bitops_1.0-7 devtools_2.4.5
[5] httr_1.4.7 RColorBrewer_1.1-3
[7] doParallel_1.0.17 profvis_0.3.8
[9] tools_4.3.3 backports_1.4.1
[11] utf8_1.2.4 R6_2.5.1
[13] lazyeval_0.2.2 uwot_0.1.16
[15] urlchecker_1.0.1 withr_3.0.0
[17] gridExtra_2.3 preprocessCore_1.64.0
[19] progressr_0.14.0 cli_3.6.2
[21] spatstat.explore_3.2-7 fastDummies_1.7.3
[23] enrichR_3.2 labeling_0.4.3
[25] spatstat.data_3.0-4 proxy_0.4-27
[27] ggridges_0.5.6 pbapply_1.7-2
[29] askpass_1.2.0 foreign_0.8-86
[31] parallelly_1.37.1 WriteXLS_6.5.0
[33] sessioninfo_1.2.2 impute_1.76.0
[35] rstudioapi_0.16.0 RSQLite_2.3.6
[37] FNN_1.1.4 generics_0.1.3
[39] combinat_0.0-8 ica_1.0-3
[41] spatstat.random_3.2-3 GO.db_3.18.0
[43] fansi_1.0.6 abind_1.4-5
[45] lifecycle_1.0.4 SparseArray_1.2.4
[47] Rtsne_0.17 grid_4.3.3
[49] blob_1.2.4 promises_1.2.1
[51] crayon_1.5.2 miniUI_0.1.1.1
[53] lattice_0.22-6 KEGGREST_1.42.0
[55] pillar_1.9.0 knitr_1.45
[57] rjson_0.2.21 future.apply_1.11.2
[59] codetools_0.2-20 leiden_0.4.3.1
[61] glue_1.7.0 data.table_1.15.4
[63] remotes_2.5.0 vctrs_0.6.5
[65] png_0.1-8 spam_2.10-0
[67] gtable_0.3.4 cachem_1.0.8
[69] xfun_0.43 S4Arrays_1.2.1
[71] mime_0.12 RcppEigen_0.3.4.0.0
[73] survival_3.5-8 iterators_1.0.14
[75] ellipsis_0.3.2 fitdistrplus_1.1-11
[77] ROCR_1.0-11 nlme_3.1-164
[79] usethis_2.2.3 bit64_4.0.5
[81] RcppAnnoy_0.0.22 irlba_2.3.5.1
[83] KernSmooth_2.23-22 rpart_4.1.23
[85] colorspace_2.1-0 DBI_1.2.2
[87] Hmisc_5.1-2 nnet_7.3-19
[89] tidyselect_1.2.1 processx_3.8.4
[91] bit_4.0.5 compiler_4.3.3
[93] curl_5.2.1 htmlTable_2.4.2
[95] desc_1.4.3 DelayedArray_0.28.0
[97] plotly_4.10.4 checkmate_2.3.1
[99] scales_1.3.0 lmtest_0.9-40
[101] callr_3.7.6 digest_0.6.35
[103] goftest_1.2-3 spatstat.utils_3.0-4
[105] rmarkdown_2.26 XVector_0.42.0
[107] htmltools_0.5.8.1 pkgconfig_2.0.3
[109] base64enc_0.1-3 fastmap_1.1.1
[111] rlang_1.1.3 htmlwidgets_1.6.4
[113] shiny_1.8.1.1 farver_2.1.1
[115] zoo_1.8-12 jsonlite_1.8.8
[117] RCurl_1.98-1.14 Formula_1.2-5
[119] GenomeInfoDbData_1.2.11 dotCall64_1.1-1
[121] munsell_0.5.1 reticulate_1.35.0
[123] stringi_1.8.3 MCMCprecision_0.4.0
[125] zlibbioc_1.48.2 MASS_7.3-60.0.1
[127] plyr_1.8.9 pkgbuild_1.4.4
[129] parallel_4.3.3 listenv_0.9.1
[131] deldir_2.0-4 Biostrings_2.70.3
[133] splines_4.3.3 tensor_1.5
[135] hms_1.1.3 ps_1.7.6
[137] spatstat.geom_3.2-9 RcppHNSW_0.6.0
[139] reshape2_1.4.4 pkgload_1.3.4
[141] evaluate_0.23 tester_0.2.0
[143] BiocManager_1.30.22 tzdb_0.4.0
[145] foreach_1.5.2 httpuv_1.6.15
[147] RANN_2.6.1 openssl_2.1.1
[149] polyclip_1.10-6 future_1.33.2
[151] scattermore_1.2 xtable_1.8-4
[153] RSpectra_0.16-1 later_1.3.2
[155] memoise_2.0.1 AnnotationDbi_1.64.1
[157] cluster_2.1.6 timechange_0.3.0
[159] globals_0.16.3
Screenshots If applicable, add screenshots to help explain your problem.