smorabit / hdWGCNA

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

OverlapModulesDEGs function error #129

Closed iwanorittks closed 1 year ago

iwanorittks commented 1 year ago

Thank you for creating this wonderful package. I got the following error when executing the OverlapModulesDEGs function. Please let me know how to solve this problem.

script

markers <- Seurat::FindAllMarkers(
  seurat_obj,
  only.pos = TRUE,
  logfc.threshold = 0.25
)

# compute marker gene overlaps
overlap_df <- OverlapModulesDEGs(
  seurat_obj,
  deg_df = markers,
  fc_cutoff = 0.25
)

error

Error in testGeneOverlap(newGeneOverlap(cur_module_genes, cur_DEGs, genome.size = genome.size)) : 
  could not find function "testGeneOverlap"

R session info R version 4.3.0 (2023-04-21) Platform: x86_64-apple-darwin20 (64-bit) Running under: macOS Ventura 13.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-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

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

time zone: Asia/Tokyo tzcode source: internal

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

other attached packages: [1] enrichR_3.2 igraph_1.5.0 WGCNA_1.72-1 fastcluster_1.2.3
[5] dynamicTreeCut_1.63-1 hdWGCNA_0.2.19 escape_1.10.0 destiny_3.14.0
[9] phateR_1.0.7 Matrix_1.5-4.1 reticulate_1.30 org.Hs.eg.db_3.17.0
[13] AnnotationDbi_1.62.1 IRanges_2.34.1 S4Vectors_0.38.1 Biobase_2.60.0
[17] BiocGenerics_0.46.0 rrvgo_1.12.0 presto_1.0.0 data.table_1.14.8
[21] cowplot_1.1.1 RColorBrewer_1.1-3 circlize_0.4.15 harmony_0.1.1
[25] decoupleR_2.6.0 msigdbr_7.5.1 fgsea_1.26.0 ComplexHeatmap_2.16.0 [29] Rfast2_0.1.4 Rcpp_1.0.10 SeuratWrappers_0.3.1 patchwork_1.1.2
[33] lubridate_1.9.2 forcats_1.0.0 stringr_1.5.0 dplyr_1.1.2
[37] purrr_1.0.1 readr_2.1.4 tidyr_1.3.0 tibble_3.2.1
[41] ggplot2_3.4.2 tidyverse_2.0.0 SeuratObject_4.1.3 Seurat_4.3.0.1

loaded via a namespace (and not attached): [1] graph_1.78.0 treemap_2.4-4 ica_1.0-3
[4] plotly_4.10.2 Formula_1.2-5 devtools_2.4.5
[7] zlibbioc_1.46.0 tidyselect_1.2.0 bit_4.0.5
[10] doParallel_1.0.17 clue_0.3-64 tm_0.7-11
[13] lattice_0.21-8 rjson_0.2.21 blob_1.2.4
[16] urlchecker_1.0.1 S4Arrays_1.0.4 parallel_4.3.0
[19] png_0.1-8 cli_3.6.1 ggplotify_0.1.0
[22] askpass_1.1 openssl_2.0.6 goftest_1.2-3
[25] VIM_6.2.2 BiocNeighbors_1.18.0 uwot_0.1.16
[28] shadowtext_0.1.2 curl_5.0.1 mime_0.12
[31] evaluate_0.21 tidytree_0.4.2 leiden_0.4.3
[34] stringi_1.7.12 backports_1.4.1 XML_3.99-0.14
[37] httpuv_1.6.11 umap_0.2.10.0 clusterProfiler_4.8.1
[40] magrittr_2.0.3 splines_4.3.0 ggraph_2.1.0
[43] sctransform_0.3.5 sessioninfo_1.2.2 DBI_1.1.3
[46] HDF5Array_1.28.1 smoother_1.1 withr_2.5.0
[49] class_7.3-22 enrichplot_1.20.0 lmtest_0.9-40
[52] GSEABase_1.62.0 tidygraph_1.2.3 BiocManager_1.30.21
[55] htmlwidgets_1.6.2 fs_1.6.2 SingleCellExperiment_1.22.0 [58] ggrepel_0.9.3 labeling_0.4.2 ranger_0.15.1
[61] DEoptimR_1.0-14 MatrixGenerics_1.12.2 sparsesvd_0.2-2
[64] RcppZiggurat_0.1.6 annotate_1.78.0 hexbin_1.28.3
[67] zoo_1.8-12 XVector_0.40.0 knitr_1.43
[70] ggplot.multistats_1.0.0 docopt_0.7.1 timechange_0.2.0
[73] foreach_1.5.2 fansi_1.0.4 ggtree_3.8.0
[76] rhdf5_2.44.0 R.oo_1.25.0 RSpectra_0.16-1
[79] irlba_2.3.5.1 tester_0.1.7 gridGraphics_0.5-1
[82] ellipsis_0.3.2 lazyeval_0.2.2 survival_3.5-5
[85] scattermore_1.2 crayon_1.5.2 RcppAnnoy_0.0.21
[88] progressr_0.13.0 tweenr_2.0.2 later_1.3.1
[91] ggridges_0.5.4 codetools_0.2-19 base64enc_0.1-3
[94] GlobalOptions_0.1.2 profvis_0.3.8 KEGGREST_1.40.0
[97] Rtsne_0.16 shape_1.4.6 limma_3.56.2
[100] foreign_0.8-84 pkgconfig_2.0.3 xml2_1.3.4
[103] GenomicRanges_1.52.0 aplot_0.1.10 scatterplot3d_0.3-44
[106] spatstat.sparse_3.0-2 ape_5.7-1 viridisLite_0.4.2
[109] gridBase_0.4-7 xtable_1.8-4 car_3.1-2
[112] plyr_1.8.8 httr_1.4.6 tools_4.3.0
[115] globals_0.16.2 pkgbuild_1.4.2 Rfast_2.0.7
[118] htmlTable_2.4.1 broom_1.0.5 checkmate_2.2.0
[121] nlme_3.1-162 HDO.db_0.99.1 assertthat_0.2.1
[124] digest_0.6.32 farver_2.1.1 tzdb_0.4.0
[127] reshape2_1.4.4 WriteXLS_6.4.0 yulab.utils_0.0.6
[130] viridis_0.6.3 rpart_4.1.19 glue_1.6.2
[133] cachem_1.0.8 polyclip_1.10-4 Hmisc_5.1-0
[136] generics_0.1.3 Biostrings_2.68.1 parallelly_1.36.0
[139] wordcloud_2.6 pkgload_1.3.2 impute_1.74.1
[142] RcppHNSW_0.4.1 ScaledMatrix_1.8.1 carData_3.0-5
[145] pbapply_1.7-2 SummarizedExperiment_1.30.2 gson_0.1.0
[148] utf8_1.2.3 graphlayouts_1.0.0 preprocessCore_1.62.1
[151] RcppEigen_0.3.3.9.3 gridExtra_2.3 shiny_1.7.4
[154] GSVA_1.48.1 GenomeInfoDbData_1.2.10 R.utils_2.12.2
[157] rhdf5filters_1.12.1 RCurl_1.98-1.12 memoise_2.0.1
[160] rmarkdown_2.23 pheatmap_1.0.12 downloader_0.4
[163] scales_1.2.1 R.methodsS3_1.8.2 future_1.33.0
[166] RANN_2.6.1 spatstat.data_3.0-1 rstudioapi_0.14
[169] cluster_2.1.4 spatstat.utils_3.0-3 hms_1.1.3
[172] fitdistrplus_1.1-11 munsell_0.5.0 colorspace_2.1-0
[175] FNN_1.1.3.2 rlang_1.1.1 GenomeInfoDb_1.36.1
[178] DelayedMatrixStats_1.22.1 sparseMatrixStats_1.12.1 xts_0.13.1
[181] ggforce_0.4.1 laeken_0.5.2 xfun_0.39
[184] e1071_1.7-13 remotes_2.4.2 iterators_1.0.14
[187] matrixStats_1.0.0 abind_1.4-5 GOSemSim_2.26.0
[190] treeio_1.24.1 Rhdf5lib_1.22.0 bitops_1.0-7
[193] ps_1.7.5 promises_1.2.0.1 scatterpie_0.2.1
[196] RSQLite_2.3.1 qvalue_2.32.0 qlcMatrix_0.9.7
[199] DelayedArray_0.26.6 proxy_0.4-27 GO.db_3.17.0
[202] compiler_4.3.0 prettyunits_1.1.1 boot_1.3-28.1
[205] beachmat_2.16.0 listenv_0.9.0 BiocSingular_1.16.0
[208] tensor_1.5 usethis_2.2.1 MASS_7.3-60
[211] BiocParallel_1.35.2 UCell_2.4.0 babelgene_22.9
[214] spatstat.random_3.1-5 R6_2.5.1 fastmap_1.1.1
[217] fastmatch_1.1-3 TTR_0.24.3 ROCR_1.0-11
[220] easypackages_0.1.0 rsvd_1.0.5 vcd_1.4-11
[223] nnet_7.3-19 gtable_0.3.3 KernSmooth_2.23-21
[226] miniUI_0.1.1.1 deldir_1.0-9 htmltools_0.5.5
[229] ggthemes_4.2.4 bit64_4.0.5 spatstat.explore_3.2-1
[232] lifecycle_1.0.3 NLP_0.2-1 processx_3.8.1
[235] callr_3.7.3 vctrs_0.6.3 slam_0.1-50
[238] robustbase_0.99-0 spatstat.geom_3.2-1 DOSE_3.26.1
[241] ggfun_0.1.1 sp_2.0-0 future.apply_1.11.0
[244] pillar_1.9.0 pcaMethods_1.92.0 jsonlite_1.8.7
[247] GetoptLong_1.0.5

smorabit commented 1 year ago

I think that you first need to load the R package GeneOverlap. I will make this more clear that it needs to be installed in the next version of hdWGCNA.

iwanorittks commented 1 year ago

Thanks for your reply. Loading the GeneOverlap package solved the problem.