smorabit / hdWGCNA

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

ModuleFeaturePlot Error #125

Closed ell5uo closed 1 year ago

ell5uo commented 1 year ago

When I get to the ModuleFeaturePlot function, I receive the error:

Error in ModuleFeaturePlot(three_wgcna, features = "hMEs", order = TRUE) : 
  trying to get slot "cell.embeddings" from an object of a basic class ("NULL") with no slots

I followed the published tutorial using my own small dataset, everything else came out well, and I can produce other graphs/visualization functions just fine.

The code I used to generate the Module Feature plot was


plot_list <- ModuleFeaturePlot(three_wgcna, features = 'hMEs', order = TRUE )

R session info

R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS  10.16

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

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

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

other attached packages:
 [1] Signac_1.6.0          hdWGCNA_0.2.19        WGCNA_1.72-1          fastcluster_1.2.3    
 [5] dynamicTreeCut_1.63-1 patchwork_1.1.2       cowplot_1.1.1         lubridate_1.8.0      
 [9] forcats_1.0.0         stringr_1.5.0         dplyr_1.1.2           purrr_1.0.1          
[13] readr_2.1.2           tidyr_1.3.0           tibble_3.2.1          ggplot2_3.4.2        
[17] tidyverse_2.0.0       SeuratObject_4.0.4    Seurat_4.1.0         

loaded via a namespace (and not attached):
  [1] utf8_1.2.3             reticulate_1.24        tidyselect_1.2.0      
  [4] RSQLite_2.2.12         AnnotationDbi_1.52.0   htmlwidgets_1.6.2     
  [7] docopt_0.7.1           grid_4.0.2             BiocParallel_1.24.1   
 [10] Rtsne_0.16             munsell_0.5.0          codetools_0.2-19      
 [13] ica_1.0-3              preprocessCore_1.52.1  interp_1.0-33         
 [16] future_1.32.0          miniUI_0.1.1.1         withr_2.5.0           
 [19] tester_0.1.7           spatstat.random_3.1-5  colorspace_2.1-0      
 [22] Biobase_2.50.0         knitr_1.43             rstudioapi_0.14       
 [25] stats4_4.0.2           ROCR_1.0-11            tensor_1.5            
 [28] listenv_0.9.0          labeling_0.4.2         slam_0.1-50           
 [31] harmony_0.1.1          GenomeInfoDbData_1.2.4 polyclip_1.10-4       
 [34] bit64_4.0.5            farver_2.1.1           parallelly_1.36.0     
 [37] vctrs_0.6.3            generics_0.1.3         xfun_0.39             
 [40] lsa_0.73.3             ggseqlogo_0.1          R6_2.5.1              
 [43] doParallel_1.0.17      GenomeInfoDb_1.26.7    bitops_1.0-7          
 [46] spatstat.utils_3.0-3   cachem_1.0.6           promises_1.2.0.1      
 [49] scales_1.2.1           nnet_7.3-17            gtable_0.3.3          
 [52] globals_0.16.2         goftest_1.2-3          rlang_1.1.1           
 [55] RcppRoll_0.3.0         splines_4.0.2          lazyeval_0.2.2        
 [58] impute_1.64.0          spatstat.geom_3.2-1    checkmate_2.2.0       
 [61] reshape2_1.4.4         abind_1.4-5            backports_1.4.1       
 [64] httpuv_1.6.5           Hmisc_4.6-0            tools_4.0.2           
 [67] ellipsis_0.3.2         spatstat.core_2.4-2    RColorBrewer_1.1-3    
 [70] BiocGenerics_0.36.1    ggridges_0.5.4         Rcpp_1.0.10           
 [73] plyr_1.8.8             base64enc_0.1-3        zlibbioc_1.36.0       
 [76] RCurl_1.98-1.6         rpart_4.1.16           deldir_1.0-9          
 [79] pbapply_1.7-0          S4Vectors_0.28.1       zoo_1.8-12            
 [82] ggrepel_0.9.3          cluster_2.1.3          magrittr_2.0.3        
 [85] data.table_1.14.8      scattermore_0.8        lmtest_0.9-40         
 [88] RANN_2.6.1             SnowballC_0.7.0        fitdistrplus_1.1-11   
 [91] matrixStats_1.0.0      hms_1.1.3              mime_0.12             
 [94] xtable_1.8-4           jpeg_0.1-9             sparsesvd_0.2         
 [97] IRanges_2.24.1         gridExtra_2.3          compiler_4.0.2        
[100] KernSmooth_2.23-20     crayon_1.5.2           htmltools_0.5.5       
[103] mgcv_1.8-40            later_1.3.0            tzdb_0.3.0            
[106] Formula_1.2-5          DBI_1.1.3              corrplot_0.92         
[109] tweenr_1.0.2           MASS_7.3-56            Matrix_1.5-4.1        
[112] cli_3.6.1              parallel_4.0.2         igraph_1.3.0          
[115] GenomicRanges_1.42.0   pkgconfig_2.0.3        foreign_0.8-82        
[118] plotly_4.10.2          spatstat.sparse_3.0-1  foreach_1.5.2         
[121] XVector_0.30.0         digest_0.6.31          sctransform_0.3.5     
[124] RcppAnnoy_0.0.20       spatstat.data_3.0-1    Biostrings_2.58.0     
[127] leiden_0.4.3           fastmatch_1.1-3        htmlTable_2.4.1       
[130] uwot_0.1.14            shiny_1.7.4            Rsamtools_2.6.0       
[133] lifecycle_1.0.3        nlme_3.1-157           jsonlite_1.8.5        
[136] viridisLite_0.4.2      fansi_1.0.4            pillar_1.9.0          
[139] lattice_0.20-45        fastmap_1.1.0          httr_1.4.6            
[142] survival_3.3-1         GO.db_3.12.1           glue_1.6.2            
[145] FNN_1.1.3.2            qlcMatrix_0.9.7        png_0.1-8             
[148] iterators_1.0.14       bit_4.0.4              ggforce_0.3.3         
[151] stringi_1.7.12         blob_1.2.4             latticeExtra_0.6-30   
[154] memoise_2.0.1          irlba_2.3.5.1          future.apply_1.11.0   
ell5uo commented 1 year ago

I solved my own problem! I had to force the reduction used to something already embedded in my object. Hopefully this can help someone in the future!

yaoxkkkkk commented 1 month ago

I solved my own problem! I had to force the reduction used to something already embedded in my object. Hopefully this can help someone in the future!

Hi! I met the same problem with you, can you describe how to solve the problem in detail?

yaoxkkkkk commented 1 month ago

I got it, just add the parameter reduction = "" and it works.