smorabit / hdWGCNA

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

ModuleEigengenes does not find the data slot #232

Closed MathieuBo closed 2 months ago

MathieuBo commented 2 months ago

Hello! Thanks for this amazing package. I have been able to run it perfectly in the past but since I updated to Seurat 5 - it is a bit more of a problem.

I am now stuck at ModuleEigengenes with the following eror message:

Error in ModuleEigengenes(seurat_obj, group.by.vars = "sample", ) : 
  no slot of name "data" for this object of class "Assay5"

Here is the code I use for this function: seurat_obj <- ModuleEigengenes( seurat_obj, group.by.vars="sample", ) Here is the Seurat object I am using:

An object of class Seurat 
39914 features across 50668 samples within 2 assays 
Active assay: RNA (19957 features, 2000 variable features)
 3 layers present: data, counts, scale.data
 1 other assay present: sketch
 6 dimensional reductions calculated: pca, integrated.rpca, umap, integrated.rpca.full, umap.full, harmony

More generally, what do you recommed in terms of dealing with Seurat 5 objects?

Here is the output of sessionInfo()

R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.2.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: Europe/London
tzcode source: internal

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

other attached packages:
 [1] hdWGCNA_0.3.00        igraph_2.0.2          ggrepel_0.9.5         harmony_1.2.0         Rcpp_1.0.12           WGCNA_1.72-5         
 [7] fastcluster_1.2.6     dynamicTreeCut_1.63-1 patchwork_1.2.0       cowplot_1.1.3         lubridate_1.9.3       forcats_1.0.0        
[13] stringr_1.5.1         dplyr_1.1.4           purrr_1.0.2           readr_2.1.5           tidyr_1.3.1           tibble_3.2.1         
[19] ggplot2_3.5.0         tidyverse_2.0.0       Seurat_5.0.1          SeuratObject_5.0.1    sp_2.1-3             

loaded via a namespace (and not attached):
  [1] RcppAnnoy_0.0.22        splines_4.3.1           later_1.3.2             bitops_1.0-7            polyclip_1.10-6         preprocessCore_1.62.1  
  [7] rpart_4.1.23            fastDummies_1.7.3       lifecycle_1.0.4         doParallel_1.0.17       globals_0.16.2          lattice_0.22-5         
 [13] MASS_7.3-60.0.1         backports_1.4.1         magrittr_2.0.3          rmarkdown_2.25          Hmisc_5.1-1             plotly_4.10.4          
 [19] httpuv_1.6.14           sctransform_0.4.1       spam_2.10-0             spatstat.sparse_3.0-3   reticulate_1.35.0       pbapply_1.7-2          
 [25] DBI_1.2.2               RColorBrewer_1.1-3      abind_1.4-5             zlibbioc_1.46.0         Rtsne_0.17              BiocGenerics_0.46.0    
 [31] RCurl_1.98-1.14         nnet_7.3-19             GenomeInfoDbData_1.2.10 IRanges_2.34.1          S4Vectors_0.38.2        irlba_2.3.5.1          
 [37] listenv_0.9.1           spatstat.utils_3.0-4    goftest_1.2-3           RSpectra_0.16-1         spatstat.random_3.2-2   fitdistrplus_1.1-11    
 [43] parallelly_1.37.0       leiden_0.4.3.1          codetools_0.2-19        tidyselect_1.2.0        farver_2.1.1            tester_0.1.7           
 [49] matrixStats_1.2.0       stats4_4.3.1            base64enc_0.1-3         spatstat.explore_3.2-6  jsonlite_1.8.8          ellipsis_0.3.2         
 [55] progressr_0.14.0        Formula_1.2-5           ggridges_0.5.6          survival_3.5-8          iterators_1.0.14        foreach_1.5.2          
 [61] tools_4.3.1             ica_1.0-3               glue_1.7.0              gridExtra_2.3           xfun_0.42               GenomeInfoDb_1.36.4    
 [67] withr_3.0.0             fastmap_1.1.1           fansi_1.0.6             digest_0.6.34           timechange_0.3.0        R6_2.5.1               
 [73] mime_0.12               colorspace_2.1-0        scattermore_1.2         GO.db_3.17.0            tensor_1.5              spatstat.data_3.0-4    
 [79] RSQLite_2.3.5           RhpcBLASctl_0.23-42     utf8_1.2.4              generics_0.1.3          data.table_1.15.0       FNN_1.1.4              
 [85] httr_1.4.7              htmlwidgets_1.6.4       uwot_0.1.16             pkgconfig_2.0.3         gtable_0.3.4            blob_1.2.4             
 [91] impute_1.74.1           lmtest_0.9-40           XVector_0.40.0          htmltools_0.5.7         dotCall64_1.1-1         scales_1.3.0           
 [97] Biobase_2.60.0          png_0.1-8               knitr_1.45              rstudioapi_0.15.0       tzdb_0.4.0              reshape2_1.4.4         
[103] checkmate_2.3.1         nlme_3.1-164            proxy_0.4-27            zoo_1.8-12              cachem_1.0.8            KernSmooth_2.23-22     
[109] parallel_4.3.1          miniUI_0.1.1.1          foreign_0.8-86          AnnotationDbi_1.62.2    pillar_1.9.0            grid_4.3.1             
[115] vctrs_0.6.5             RANN_2.6.1              promises_1.2.1          xtable_1.8-4            cluster_2.1.6           htmlTable_2.4.2        
[121] evaluate_0.23           cli_3.6.2               compiler_4.3.1          rlang_1.1.3             crayon_1.5.2            future.apply_1.11.1    
[127] labeling_0.4.3          plyr_1.8.9              stringi_1.8.3           viridisLite_0.4.2       deldir_2.0-2            munsell_0.5.0          
[133] Biostrings_2.68.1       lazyeval_0.2.2          spatstat.geom_3.2-8     Matrix_1.6-5            RcppHNSW_0.6.0          hms_1.1.3              
[139] bit64_4.0.5             future_1.33.1           KEGGREST_1.40.1         shiny_1.8.0             ROCR_1.0-11             memoise_2.0.1          
[145] bit_4.0.5  
smorabit commented 2 months ago

Hi,

Seurat 5 is proving to be a huge pain, but thank you for helping me find these bugs and reporting them! I was able to reproduce this on my side and I think I fixed the source of this problem Can you please re-install the package and try running it again?

MathieuBo commented 2 months ago

This worked! Amazing! Thanks a lot! :)