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

Error when running scVIIntegration: Error in object[][features, ] : incorrect number of dimensions #8897

Closed
doreszr opened this issue May 15, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@doreszr
Copy link

doreszr commented May 15, 2024

Error when running scVIIntegration: Error in object[][features, ] : incorrect number of dimensions

Hi, I'm running Seurat v5 and when I try to integrate with scVIIntegration and I get an error and a warning.
I called the function like:

merged.salmon <- IntegrateLayers(
  object = merged.salmon, method = scVIIntegration,
  new.reduction = "integrated.scvi",
  conda_env = "~/miniforge3/envs/scvi-env2", verbose = T
)

Error in object[][features, ] : incorrect number of dimensions
In addition: Warning message:
In LayerData.Assay5(object, layers = "counts") :
  multiple layers are identified by data.salmon1 data.salmon2
 only the first layer is used

I saw this was an issue earlier but it was reported as fixed in late March so I'm wondering why I still have this bug. It is a great feature of v5 so it would be great to use it.

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

other attached packages:
 [1] SeuratWrappers_0.3.2 reticulate_1.36.1    DoubletFinder_2.0.4  fields_15.2          viridisLite_0.4.2    spam_2.10-0          ROCR_1.0-11          glmGamPoi_1.12.2    
 [9] sctransform_0.4.1    Matrix_1.6-5         cowplot_1.1.3        clustree_0.5.0       ggraph_2.1.0         lubridate_1.9.2      forcats_1.0.0        stringr_1.5.1       
[17] dplyr_1.1.4          purrr_1.0.2          readr_2.1.4          tidyr_1.3.1          tibble_3.2.1         tidyverse_2.0.0      patchwork_1.2.0      ggplot2_3.5.1       
[25] Seurat_5.0.0         SeuratObject_5.0.2   sp_2.1-4            

loaded via a namespace (and not attached):
  [1] RcppAnnoy_0.0.22            splines_4.3.3               later_1.3.2                 bitops_1.0-7                R.oo_1.25.0                 polyclip_1.10-6            
  [7] fastDummies_1.7.3           lifecycle_1.0.4             rprojroot_2.0.4             globals_0.16.3              processx_3.8.2              lattice_0.22-5             
 [13] MASS_7.3-60.0.1             magrittr_2.0.3              plotly_4.10.4               remotes_2.5.0               httpuv_1.6.15               sessioninfo_1.2.2          
 [19] pkgbuild_1.4.3              spatstat.sparse_3.0-3       pbapply_1.7-2               RColorBrewer_1.1-3          maps_3.4.2                  zlibbioc_1.46.0            
 [25] abind_1.4-5                 pkgload_1.3.2.1             Rtsne_0.17                  GenomicRanges_1.52.0        R.utils_2.12.2              BiocGenerics_0.46.0        
 [31] RCurl_1.98-1.12             tweenr_2.0.2                GenomeInfoDbData_1.2.10     IRanges_2.34.1              S4Vectors_0.38.1            ggrepel_0.9.5              
 [37] irlba_2.3.5.1               listenv_0.9.1               spatstat.utils_3.0-4        goftest_1.2-3               RSpectra_0.16-1             spatstat.random_3.2-3      
 [43] fitdistrplus_1.1-11         parallelly_1.37.1           DelayedArray_0.26.7         leiden_0.4.3.1              codetools_0.2-19            ggforce_0.4.1              
 [49] tidyselect_1.2.1            farver_2.1.2                viridis_0.6.4               matrixStats_1.3.0           stats4_4.3.3                spatstat.explore_3.2-7     
 [55] jsonlite_1.8.8              ellipsis_0.3.2              tidygraph_1.2.3             progressr_0.14.0            ggridges_0.5.6              survival_3.5-8             
 [61] tools_4.3.3                 ica_1.0-3                   Rcpp_1.0.12                 glue_1.7.0                  gridExtra_2.3               MatrixGenerics_1.12.3      
 [67] usethis_2.2.2               GenomeInfoDb_1.36.3         withr_3.0.0                 BiocManager_1.30.23         fastmap_1.1.1               fansi_1.0.6                
 [73] rsvd_1.0.5                  callr_3.7.3                 digest_0.6.35               timechange_0.2.0            R6_2.5.1                    mime_0.12                  
 [79] colorspace_2.1-0            scattermore_1.2             tensor_1.5                  spatstat.data_3.0-4         R.methodsS3_1.8.2           utf8_1.2.4                 
 [85] generics_0.1.3              data.table_1.15.4           S4Arrays_1.0.5              graphlayouts_1.0.0          httr_1.4.7                  htmlwidgets_1.6.4          
 [91] uwot_0.1.16                 pkgconfig_2.0.3             gtable_0.3.5                lmtest_0.9-40               XVector_0.40.0              htmltools_0.5.8.1          
 [97] profvis_0.3.8               dotCall64_1.1-1             Biobase_2.60.0              scales_1.3.0                png_0.1-8                   rstudioapi_0.15.0          
[103] tzdb_0.4.0                  reshape2_1.4.4              nlme_3.1-164                curl_5.2.1                  cachem_1.0.8                zoo_1.8-12                 
[109] KernSmooth_2.23-22          miniUI_0.1.1.1              desc_1.4.2                  pillar_1.9.0                grid_4.3.3                  vctrs_0.6.5                
[115] RANN_2.6.1                  urlchecker_1.0.1            promises_1.3.0              xtable_1.8-4                cluster_2.1.6               cli_3.6.2                  
[121] compiler_4.3.3              crayon_1.5.2                rlang_1.1.3                 future.apply_1.11.2         ps_1.7.5                    plyr_1.8.9                 
[127] fs_1.6.4                    stringi_1.8.4               deldir_2.0-4                munsell_0.5.1               lazyeval_0.2.2              devtools_2.4.5             
[133] spatstat.geom_3.2-9         RcppHNSW_0.6.0              hms_1.1.3                   future_1.33.2               shiny_1.8.1.1               SummarizedExperiment_1.30.2
[139] igraph_2.0.3                memoise_2.0.1              
@doreszr doreszr added the bug Something isn't working label May 15, 2024
@igrabski
Copy link
Contributor

Hi, it looks like you are currently using Seurat 5.0.0 -- try upgrading to Seurat 5.1.0 and see if the issue persists!

@christine-liu
Copy link

I'm running into this same issue with Seurat 5.1.0. I don't think it's an issue with my scvi-tools installation as I am able to load it in python just fine. I've seen other issues and mentions that it was supposed to be fixed in this version, but it doesn't seem like it is.
#7944

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

Matrix products: default
BLAS/LAPACK: /home/cliu/anaconda3/envs/seurat_scvi/lib/libopenblasp-r0.3.27.so;  LAPACK version 3.12.0

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: America/Los_Angeles
tzcode source: system (glibc)

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

other attached packages:
[1] SeuratWrappers_0.3.2 Seurat_5.1.0         SeuratObject_5.0.2  
[4] sp_2.1-4            

loaded via a namespace (and not attached):
  [1] RColorBrewer_1.1-3     jsonlite_1.8.7         magrittr_2.0.3        
  [4] spatstat.utils_3.0-5   fs_1.6.3               vctrs_0.6.4           
  [7] ROCR_1.0-11            memoise_2.0.1          spatstat.explore_3.3-1
 [10] usethis_2.2.2          htmltools_0.5.6.1      curl_5.1.0            
 [13] sctransform_0.4.1      parallelly_1.38.0      KernSmooth_2.23-24    
 [16] desc_1.4.2             htmlwidgets_1.6.2      ica_1.0-3             
 [19] plyr_1.8.9             cachem_1.0.8           plotly_4.10.4         
 [22] zoo_1.8-12             igraph_2.0.3           mime_0.12             
 [25] lifecycle_1.0.4        pkgconfig_2.0.3        rsvd_1.0.5            
 [28] Matrix_1.6-5           R6_2.5.1               fastmap_1.1.1         
 [31] fitdistrplus_1.2-1     future_1.34.0          shiny_1.9.1           
 [34] digest_0.6.33          colorspace_2.1-0       patchwork_1.2.0       
 [37] ps_1.7.5               rprojroot_2.0.4        tensor_1.5            
 [40] RSpectra_0.16-2        irlba_2.3.5.1          pkgload_1.3.3         
 [43] progressr_0.14.0       fansi_1.0.5            spatstat.sparse_3.1-0 
 [46] httr_1.4.7             polyclip_1.10-7        abind_1.4-5           
 [49] compiler_4.3.3         remotes_2.4.2.1        withr_3.0.1           
 [52] fastDummies_1.7.3      pkgbuild_1.4.2         R.utils_2.12.3        
 [55] MASS_7.3-60            sessioninfo_1.2.2      tools_4.3.3           
 [58] lmtest_0.9-40          httpuv_1.6.15          future.apply_1.11.2   
 [61] goftest_1.2-3          R.oo_1.26.0            glue_1.6.2            
 [64] callr_3.7.3            nlme_3.1-163           promises_1.2.1        
 [67] grid_4.3.3             Rtsne_0.17             cluster_2.1.6         
 [70] reshape2_1.4.4         generics_0.1.3         gtable_0.3.5          
 [73] spatstat.data_3.1-2    R.methodsS3_1.8.2      tidyr_1.3.0           
 [76] data.table_1.15.4      utf8_1.2.4             spatstat.geom_3.3-2   
 [79] RcppAnnoy_0.0.22       ggrepel_0.9.5          RANN_2.6.1            
 [82] pillar_1.9.0           stringr_1.5.1          spam_2.10-0           
 [85] RcppHNSW_0.6.0         later_1.3.1            splines_4.3.3         
 [88] dplyr_1.1.3            lattice_0.22-5         survival_3.7-0        
 [91] deldir_2.0-4           tidyselect_1.2.1       miniUI_0.1.1.1        
 [94] pbapply_1.7-2          gridExtra_2.3          scattermore_1.2       
 [97] devtools_2.4.5         matrixStats_1.0.0      stringi_1.7.12        
[100] lazyeval_0.2.2         codetools_0.2-20       tibble_3.2.1          
[103] BiocManager_1.30.23    cli_3.6.1              uwot_0.2.2            
[106] xtable_1.8-4           reticulate_1.38.0      munsell_0.5.1         
[109] processx_3.8.2         Rcpp_1.0.11            globals_0.16.3        
[112] spatstat.random_3.3-1  png_0.1-8              spatstat.univar_3.0-0 
[115] parallel_4.3.3         ellipsis_0.3.2         ggplot2_3.5.1         
[118] prettyunits_1.2.0      dotCall64_1.1-1        profvis_0.3.8         
[121] urlchecker_1.0.1       listenv_0.9.1          viridisLite_0.4.2     
[124] scales_1.3.0           ggridges_0.5.6         leiden_0.4.3.1        
[127] purrr_1.0.2            crayon_1.5.3           rlang_1.1.1           
[130] cowplot_1.1.3         

Thanks!

@igrabski
Copy link
Contributor

Hi Christine, could you please show your code (showing all processing steps if possible) and the error you get?

@igrabski
Copy link
Contributor

Hi Christine, I think your version of SeuratWrappers may actually be out-of-date -- could you try updating it and seeing if the issue resolves?

@christine-liu
Copy link

@igrabski updating SeuratWrappers seems to work! Thanks so much :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants