Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got errors when running tutorial, "error in evaluating the argument 'x' in selecting a method for function 'as.matrix': no slot of name "data" for this object of class "Assay5"" #41

Open
RongqinChen opened this issue Jul 18, 2024 · 1 comment

Comments

@RongqinChen
Copy link

Dear authors,

I got an error message when I try to run the tutorial, Effect of Tal1 knock out on mouse development.

The error comes from the following code:

modules_wgcna = suppressMessages(get_wgcna_modules(convert_de_stat(de_stat) , n_hoods_sig.thresh = 4))

The error is

Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.matrix': no slot of name "data" for this object of class "Assay5"
Traceback:

1. suppressMessages(get_wgcna_modules(convert_de_stat(de_stat), 
 .     n_hoods_sig.thresh = 4))
2. withCallingHandlers(expr, message = function(c) if (inherits(c, 
 .     classes)) tryInvokeRestart("muffleMessage"))
3. get_wgcna_modules(convert_de_stat(de_stat), n_hoods_sig.thresh = 4)
4. as.matrix(obj.seurat[["RNA"]]@data)   # at line 44 of file <text>
5. .handleSimpleError(function (cond) 
 . .Internal(C_tryCatchHelper(addr, 1L, cond)), "no slot of name \"data\" for this object of class \"Assay5\"", 
 .     base::quote(as.matrix(obj.seurat[["RNA"]]@data)))   # at line 44 of file <text>
6. h(simpleError(msg, call))

My sessionInfo is

R version 4.3.3 (2024-02-29)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 22.04.4 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Asia/Shanghai
tzcode source: system (glibc)

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

other attached packages:
 [1] reshape2_1.4.4              scWGCNA_1.0.0              
 [3] viridis_0.6.5               viridisLite_0.4.2          
 [5] miloDE_0.0.0.9000           patchwork_1.2.0            
 [7] dplyr_1.1.4                 scran_1.30.2               
 [9] scater_1.30.1               ggplot2_3.5.1              
[11] scuttle_1.12.0              miloR_1.10.0               
[13] edgeR_4.0.16                limma_3.58.1               
[15] SingleCellExperiment_1.24.0 SummarizedExperiment_1.32.0
[17] Biobase_2.62.0              GenomicRanges_1.54.1       
[19] GenomeInfoDb_1.38.8         IRanges_2.36.0             
[21] S4Vectors_0.40.2            BiocGenerics_0.48.1        
[23] MatrixGenerics_1.14.0       matrixStats_1.3.0          
[25] Seurat_5.1.0                SeuratObject_5.0.2         
[27] sp_2.1-4                   

loaded via a namespace (and not attached):
  [1] spatstat.sparse_3.1-0     bitops_1.0-7             
  [3] lubridate_1.9.3           doParallel_1.0.17        
  [5] httr_1.4.7                RColorBrewer_1.1-3       
  [7] dynamicTreeCut_1.63-1     repr_1.1.7               
  [9] backports_1.5.0           tools_4.3.3              
 [11] sctransform_0.4.1         utf8_1.2.4               
 [13] R6_2.5.1                  lazyeval_0.2.2           
 [15] uwot_0.2.2                yardstick_1.3.1          
 [17] withr_3.0.0               gridExtra_2.3            
 [19] preprocessCore_1.64.0     progressr_0.14.0         
 [21] WGCNA_1.72-5              cli_3.6.3                
 [23] Cairo_1.6-2               spatstat.explore_3.3-1   
 [25] fastDummies_1.7.3         labeling_0.4.3           
 [27] spatstat.data_3.1-2       RcppGreedySetCover_0.1.0 
 [29] randomForest_4.7-1.1      ggridges_0.5.6           
 [31] pbapply_1.7-2             pbdZMQ_0.3-11            
 [33] foreign_0.8-87            dichromat_2.0-0.1        
 [35] parallelly_1.37.1         maps_3.4.2               
 [37] impute_1.76.0             rstudioapi_0.16.0        
 [39] RSQLite_2.3.7             pals_1.8                 
 [41] generics_0.1.3            gtools_3.9.5             
 [43] ica_1.0-3                 spatstat.random_3.3-1    
 [45] car_3.1-2                 GO.db_3.18.0             
 [47] Matrix_1.6-5              ggbeeswarm_0.7.2         
 [49] fansi_1.0.6               abind_1.4-5              
 [51] lifecycle_1.0.4           carData_3.0-5            
 [53] recipes_1.1.0             SparseArray_1.2.4        
 [55] Rtsne_0.17                blob_1.2.4               
 [57] grid_4.3.3                promises_1.3.0           
 [59] dqrng_0.4.1               crayon_1.5.3             
 [61] miniUI_0.1.1.1            lattice_0.22-6           
 [63] beachmat_2.18.1           cowplot_1.1.3            
 [65] KEGGREST_1.42.0           mapproj_1.2.11           
 [67] knitr_1.48                pillar_1.9.0             
 [69] metapod_1.10.1            future.apply_1.11.2      
 [71] codetools_0.2-20          Augur_1.0.3              
 [73] leiden_0.4.3.1            glue_1.7.0               
 [75] rsample_1.2.1             spatstat.univar_3.0-0    
 [77] data.table_1.15.4         vctrs_0.6.5              
 [79] png_0.1-8                 spam_2.10-0              
 [81] gtable_0.3.5              cachem_1.1.0             
 [83] xfun_0.45                 gower_1.0.1              
 [85] S4Arrays_1.2.1            mime_0.12                
 [87] prodlim_2024.06.25        tidygraph_1.3.1          
 [89] survival_3.7-0            timeDate_4032.109        
 [91] iterators_1.0.14          pbmcapply_1.5.1          
 [93] hardhat_1.4.0             lava_1.8.0               
 [95] statmod_1.5.0             bluster_1.12.0           
 [97] fitdistrplus_1.2-1        ROCR_1.0-11              
 [99] ipred_0.9-14              nlme_3.1-165             
[101] bit64_4.0.5               RcppAnnoy_0.0.22         
[103] irlba_2.3.5.1             vipor_0.4.7              
[105] KernSmooth_2.23-24        rpart_4.1.23             
[107] Hmisc_5.1-3               DBI_1.2.3                
[109] colorspace_2.1-0          nnet_7.3-19              
[111] tidyselect_1.2.1          bit_4.0.5                
[113] compiler_4.3.3            htmlTable_2.4.2          
[115] BiocNeighbors_1.20.2      DelayedArray_0.28.0      
[117] plotly_4.10.4             checkmate_2.3.1          
[119] scales_1.3.0              lmtest_0.9-40            
[121] stringr_1.5.1             digest_0.6.36            
[123] goftest_1.2-3             spatstat.utils_3.0-5     
[125] rmarkdown_2.27            XVector_0.42.0           
[127] htmltools_0.5.8.1         pkgconfig_2.0.3          
[129] base64enc_0.1-3           sparseMatrixStats_1.14.0 
[131] fastmap_1.2.0             rlang_1.1.4              
[133] htmlwidgets_1.6.4         shiny_1.8.1.1            
[135] DelayedMatrixStats_1.24.0 farver_2.1.2             
[137] zoo_1.8-12                jsonlite_1.8.8           
[139] BiocParallel_1.36.0       BiocSingular_1.18.0      
[141] RCurl_1.98-1.16           magrittr_2.0.3           
[143] Formula_1.2-5             GenomeInfoDbData_1.2.11  
[145] dotCall64_1.1-1           IRkernel_1.3.2           
[147] munsell_0.5.1             Rcpp_1.0.12              
[149] reticulate_1.38.0         furrr_0.3.1              
[151] stringi_1.8.4             ggraph_2.2.1             
[153] zlibbioc_1.48.2           MASS_7.3-60.0.1          
[155] plyr_1.8.9                parallel_4.3.3           
[157] listenv_0.9.1             ggrepel_0.9.5            
[159] deldir_2.0-4              Biostrings_2.70.3        
[161] graphlayouts_1.1.1        IRdisplay_1.1            
[163] splines_4.3.3             tensor_1.5               
[165] locfit_1.5-9.10           fastcluster_1.2.6        
[167] ggpubr_0.6.0              igraph_2.0.3             
[169] uuid_1.2-0                spatstat.geom_3.3-2      
[171] ggsignif_0.6.4            RcppHNSW_0.6.0           
[173] parsnip_1.2.1             ScaledMatrix_1.10.0      
[175] evaluate_0.24.0           tester_0.2.0             
[177] foreach_1.5.2             tweenr_2.0.3             
[179] httpuv_1.6.15             RANN_2.6.1               
[181] tidyr_1.3.1               purrr_1.0.2              
[183] polyclip_1.10-6           future_1.33.2            
[185] scattermore_1.2           ggforce_0.4.2            
[187] rsvd_1.0.5                broom_1.0.6              
[189] xtable_1.8-4              RSpectra_0.16-1          
[191] rstatix_0.7.2             later_1.3.2              
[193] class_7.3-22              tibble_3.2.1             
[195] AnnotationDbi_1.64.1      memoise_2.0.1            
[197] beeswarm_0.4.0            cluster_2.1.6            
[199] timechange_0.3.0          globals_0.16.3  

Dear authors, can you give me some advice on why this error occurs and how to fix it? Thanks.

@amissarova
Copy link
Collaborator

Hi @RongqinChen ,
I'm pretty sure that the issue is (unfortunately) with scWGCNA relying on V4 of Seurat. So if you want to be able to run it, you would need to downgrade the Seurat to V4 (miloDE itself doesn't rely on Seurat so you can do it within your project, but I realise it might be an inconvenience to do so if you use Seurat for other things).

I will add the note on the landing page to use the right version of Seurat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants