saezlab / liana

LIANA: a LIgand-receptor ANalysis frAmework
https://saezlab.github.io/liana/
GNU General Public License v3.0
160 stars 28 forks source link

Error: All columns in a tibble must be vectors., in liana_tensor_c2c #128

Closed jonhsussman closed 9 months ago

jonhsussman commented 9 months ago

Hello,

I am getting an error upon running liana_tensor_c2c. After it runs, it states, "all column in a tibble must be vectors" and then does not save the result. I have successfully run this previously, so I believe it might be a versioning issue but I cannot figure out what might be the problem.

Please let me know if you have any solution or advice.

Thanks, Jonathan

> sce.liana.2.tensor <- liana_tensor_c2c(sce = sce.liana.2, 
+                                        score_col = 'LRscore',
+                                        rank = 8,
+                                        how='outer')
Setting up Conda Environment with Basilisk
Building the tensor using LRscore...

  0%|          | 0/58 [00:00<?, ?it/s]
  2%|▏         | 1/58 [00:02<02:09,  2.27s/it]
...
100%|██████████| 58/58 [01:28<00:00,  1.53s/it]
Decomposing the tensor...
Error in `as_tibble()`:
! All columns in a tibble must be vectors.
✖ Column `Factor.1` is a `numpy.ndarray/python.builtin.object` object.
✖ Column `Factor.2` is a `numpy.ndarray/python.builtin.object` object.
✖ Column `Factor.3` is a `numpy.ndarray/python.builtin.object` object.
✖ Column `Factor.4` is a `numpy.ndarray/python.builtin.object` object.
✖ Column `Factor.5` is a `numpy.ndarray/python.builtin.object` object.
✖ … and 3 more problems.
 sessionInfo()
R version 4.2.3 (2023-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux 9.1 (Plow)

Matrix products: default
BLAS:   /cm/shared/apps_chop/R/4.2.3/lib64/R/lib/libRblas.so
LAPACK: /cm/shared/apps_chop/R/4.2.3/lib64/R/lib/libRlapack.so

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

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

other attached packages:
 [1] liana_0.1.12            speckle_0.99.7          factoextra_1.0.7        ggalluvial_0.12.5      
 [5] NMF_0.26                cluster_2.1.4           rngtools_1.5.2          registry_0.5-1         
 [9] decoupleR_2.4.0         ComplexHeatmap_2.14.0   circlize_0.4.15         magrittr_2.0.3         
[13] entropy_1.3.1           lubridate_1.9.2         forcats_1.0.0           purrr_1.0.2            
[17] readr_2.1.4             tidyr_1.3.0             tidyverse_2.0.0         CellChat_1.6.1         
[21] Biobase_2.58.0          BiocGenerics_0.44.0     igraph_1.5.1            stringr_1.5.0          
[25] openxlsx_4.2.5.2        RColorBrewer_1.1-3      scales_1.2.1            ggpubr_0.6.0           
[29] gridExtra_2.3           dittoSeq_1.10.0         dplyr_1.1.3             Seurat_4.9.9.9059      
[33] SeuratObject_4.9.9.9091 sp_2.1-0                tibble_3.2.1            ggplot2_3.4.4          

loaded via a namespace (and not attached):
  [1] rappdirs_0.3.3              scattermore_1.2             coda_0.19-4                
  [4] knitr_1.44                  irlba_2.3.5.1               DelayedArray_0.24.0        
  [7] data.table_1.14.8           RCurl_1.98-1.12             doParallel_1.0.17          
 [10] generics_0.1.3              ScaledMatrix_1.6.0          cowplot_1.1.1              
 [13] RANN_2.6.1                  future_1.33.0               tzdb_0.4.0                 
 [16] spatstat.data_3.0-1         xml2_1.3.5                  httpuv_1.6.11              
 [19] SummarizedExperiment_1.28.0 xfun_0.40                   hms_1.1.3                  
 [22] evaluate_0.22               promises_1.2.1              fansi_1.0.5                
 [25] progress_1.2.2              readxl_1.4.3                htmlwidgets_1.6.2          
 [28] spatstat.geom_3.2-5         stats4_4.2.3                ellipsis_0.3.2             
 [31] RSpectra_0.16-1             backports_1.4.1             gridBase_0.4-7             
 [34] deldir_1.0-9                sparseMatrixStats_1.10.0    MatrixGenerics_1.10.0      
 [37] vctrs_0.6.3                 SingleCellExperiment_1.20.1 ROCR_1.0-11                
 [40] abind_1.4-5                 withr_2.5.1                 progressr_0.14.0           
 [43] checkmate_2.2.0             sctransform_0.4.0           sna_2.7-1                  
 [46] prettyunits_1.2.0           scran_1.26.2                goftest_1.2-3              
 [49] svglite_2.1.1               dir.expiry_1.6.0            dotCall64_1.0-2            
 [52] lazyeval_0.2.2              crayon_1.5.2                basilisk.utils_1.11.2      
 [55] spatstat.explore_3.2-3      edgeR_3.40.2                pkgconfig_2.0.3            
 [58] GenomeInfoDb_1.34.9         nlme_3.1-162                rlang_1.1.1                
 [61] globals_0.16.2              lifecycle_1.0.3             miniUI_0.1.1.1             
 [64] filelock_1.0.2              fastDummies_1.7.3           rsvd_1.0.5                 
 [67] cellranger_1.1.0            polyclip_1.10-4             RcppHNSW_0.5.0             
 [70] matrixStats_1.0.0           lmtest_0.9-40               Matrix_1.6-1               
 [73] carData_3.0-5               zoo_1.8-12                  ggridges_0.5.4             
 [76] GlobalOptions_0.1.2         pheatmap_1.0.12             png_0.1-8                  
 [79] viridisLite_0.4.2           rjson_0.2.21                bitops_1.0-7               
 [82] KernSmooth_2.23-21          ggnetwork_0.5.12            spam_2.9-1                 
 [85] DelayedMatrixStats_1.20.0   shape_1.4.6                 parallelly_1.36.0          
 [88] spatstat.random_3.1-6       rstatix_0.7.2               S4Vectors_0.36.2           
 [91] ggsignif_0.6.4              beachmat_2.14.2             plyr_1.8.8                 
 [94] ica_1.0-3                   zlibbioc_1.44.0             compiler_4.2.3             
 [97] dqrng_0.3.1                 clue_0.3-65                 fitdistrplus_1.1-11        
[100] cli_3.6.1                   XVector_0.38.0              listenv_0.9.0              
[103] patchwork_1.1.3             pbapply_1.7-2               MASS_7.3-60                
[106] tidyselect_1.2.0            stringi_1.7.12              yaml_2.3.7                 
[109] BiocSingular_1.14.0         locfit_1.5-9.8              ggrepel_0.9.3              
[112] timechange_0.2.0            tools_4.2.3                 future.apply_1.11.0        
[115] parallel_4.2.3              rstudioapi_0.15.0           bluster_1.8.0              
[118] foreach_1.5.2               metapod_1.6.0               Rtsne_0.16                 
[121] digest_0.6.33               BiocManager_1.30.22         FNN_1.1.3.2                
[124] shiny_1.7.5                 Rcpp_1.0.11                 GenomicRanges_1.50.2       
[127] car_3.1-2                   broom_1.0.5                 scuttle_1.8.4              
[130] later_1.3.1                 RcppAnnoy_0.0.21            httr_1.4.7                 
[133] colorspace_2.1-0            rvest_1.0.3                 tensor_1.5                 
[136] reticulate_1.31             IRanges_2.32.0              splines_4.2.3              
[139] uwot_0.1.16                 statmod_1.5.0               OmnipathR_3.9.1            
[142] spatstat.utils_3.0-3        basilisk_1.11.3             systemfonts_1.0.4          
[145] plotly_4.10.2               xtable_1.8-4                jsonlite_1.8.7             
[148] R6_2.5.1                    pillar_1.9.0                htmltools_0.5.6            
[151] mime_0.12                   glue_1.6.2                  fastmap_1.1.1              
[154] BiocParallel_1.32.6         BiocNeighbors_1.16.0        codetools_0.2-19           
[157] utf8_1.2.3                  lattice_0.21-8              spatstat.sparse_3.0-2      
[160] logger_0.2.2                network_1.18.1              curl_5.0.2                 
[163] leiden_0.4.3                zip_2.3.0                   survival_3.5-5             
[166] limma_3.54.2                rmarkdown_2.25              statnet.common_4.9.0       
[169] munsell_0.5.0               GetoptLong_1.0.5            GenomeInfoDbData_1.2.9     
[172] iterators_1.0.14            reshape2_1.4.4              gtable_0.3.4  
jonhsussman commented 9 months ago

This issue was fixed by simply using the base conda environment, but leaving it up in case others encounter the same error.