MarcElosua / SPOTlight

Spatial Transcriptomics Capture Location Deconvolution
https://marcelosua.github.io/SPOTlight
GNU General Public License v3.0
162 stars 25 forks source link

Error: `.data` must be a data frame without row names #11

Closed ok-gitr closed 3 years ago

ok-gitr commented 3 years ago

Hi Marc,

I am getting an error when running spotlight_deconvolution() with your example dataset. More info:

[1] "Preparing Gene set"
[1] "Normalizing count matrix"
[1] "Seeding initial matrices"
[1] "Training..."
[1] "Time to train NMF model was 11.81mins"
Error: `.data` must be a data frame without row names.
Run `rlang::last_error()` to see where the error occurred.
> rlang::last_error()
<error/tibble_error_already_has_rownames>
`.data` must be a data frame without row names.
Backtrace:
 1. SPOTlight::spotlight_deconvolution(...)
 5. tibble::column_to_rownames(., "clust_vr")
Run `rlang::last_trace()` to see the full context.
> rlang::last_trace()
<error/tibble_error_already_has_rownames>
`.data` must be a data frame without row names.
Backtrace:
    █
 1. ├─SPOTlight::spotlight_deconvolution(...)
 2. │ └─SPOTlight::topic_profile_per_cluster_nmf(...)
 3. │   └─`%>%`(...)
 4. ├─base::as.matrix(.)
 5. └─tibble::column_to_rownames(., "clust_vr")
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.6

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.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] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] edgeR_3.32.1              limma_3.46.0              Matrix_1.3-2              NMF_0.23.0               
 [5] cluster_2.1.0             rngtools_1.5              pkgmaker_0.32.2           registry_0.5-1           
 [9] tibble_3.0.5              purrr_0.3.4               stxBrain.SeuratData_0.1.1 SeuratData_0.2.1         
[13] Seurat_3.2.3              SPOTlight_0.1.2           AnnotationHub_2.22.0      BiocFileCache_1.14.0     
[17] dbplyr_2.0.0              org.Mm.eg.db_3.12.0       org.Mmu.eg.db_3.12.0      org.Hs.eg.db_3.12.0      
[21] AnnotationDbi_1.52.0      IRanges_2.24.1            S4Vectors_0.28.1          Biobase_2.50.0           
[25] BiocGenerics_0.36.0       knitr_1.30                ggupset_0.3.0             shinyjs_2.0.0.9000       
[29] enrichR_2.1               rmdformats_1.0.1          ggplot2_3.3.3             dplyr_1.0.3              
[33] shinytest_1.5.0           promises_1.1.1            shiny_1.5.0              

loaded via a namespace (and not attached):
  [1] rappdirs_0.3.1                scattermore_0.7               tidyr_1.1.2                  
  [4] bit64_4.0.5                   irlba_2.3.3                   rpart_4.1-15                 
  [7] data.table_1.13.6             doParallel_1.0.16             RCurl_1.98-1.2               
 [10] generics_0.1.0                callr_3.5.1                   cowplot_1.1.1                
 [13] usethis_2.0.0                 RSQLite_2.2.2                 shadowtext_0.0.7             
 [16] RANN_2.6.1                    future_1.21.0                 chron_2.3-56                 
 [19] bit_4.0.4                     enrichplot_1.10.1             spatstat.data_1.7-0          
 [22] httpuv_1.5.5                  assertthat_0.2.1              viridis_0.5.1                
 [25] STRINGdb_2.2.0                xfun_0.20                     evaluate_0.14                
 [28] fansi_0.4.2                   caTools_1.18.1                igraph_1.2.6                 
 [31] DBI_1.1.1                     pingr_2.0.1                   htmlwidgets_1.5.3            
 [34] hash_2.2.6.1                  ellipsis_0.3.1                RSpectra_0.16-0              
 [37] crosstalk_1.1.1               ggnewscale_0.4.5              backports_1.2.1              
 [40] bookdown_0.21                 gridBase_0.4-7                deldir_0.2-9                 
 [43] vctrs_0.3.6                   remotes_2.2.0                 ROCR_1.0-11                  
 [46] abind_1.4-5                   withr_2.4.0                   ggforce_0.3.2                
 [49] checkmate_2.0.0               sctransform_0.3.2             prettyunits_1.1.1            
 [52] goftest_1.2-2                 DOSE_3.16.0                   lazyeval_0.2.2               
 [55] crayon_1.3.4                  webdriver_1.0.6               pkgconfig_2.0.3              
 [58] labeling_0.4.2                tweenr_1.0.1                  nlme_3.1-151                 
 [61] pkgload_1.1.0                 rematch_1.0.1                 devtools_2.3.2               
 [64] rlang_0.4.10                  globals_0.14.0                lifecycle_0.2.0              
 [67] miniUI_0.1.1.1                downloader_0.4                rsvd_1.0.3                   
 [70] rprojroot_2.0.2               polyclip_1.10-0               matrixStats_0.57.0           
 [73] lmtest_0.9-38                 showimage_1.0.0               graph_1.68.0                 
 [76] zoo_1.8-8                     base64enc_0.1-3               formattable_0.2.1            
 [79] geneSetVis_1.0.0              ggridges_0.5.3                processx_3.4.5               
 [82] png_0.1-7                     viridisLite_0.3.0             rjson_0.2.20                 
 [85] bitops_1.0-6                  shinydashboard_0.7.1          debugme_1.1.0                
 [88] KernSmooth_2.23-18            blob_1.2.1                    stringr_1.4.0                
 [91] qvalue_2.22.0                 parallelly_1.23.0             reactome.db_1.74.0           
 [94] scales_1.1.1                  memoise_1.1.0                 graphite_1.36.0              
 [97] magrittr_2.0.1                plyr_1.8.6                    ica_1.0-2                    
[100] gplots_3.1.1                  compiler_4.0.3                scatterpie_0.1.5             
[103] RColorBrewer_1.1-2            plotrix_3.7-8                 fitdistrplus_1.1-3           
[106] cli_2.2.0                     listenv_0.8.0                 patchwork_1.1.1              
[109] pbapply_1.4-3                 ps_1.5.0                      mgcv_1.8-33                  
[112] MASS_7.3-53                   tidyselect_1.1.0              stringi_1.5.3                
[115] yaml_2.2.1                    GOSemSim_2.16.1               locfit_1.5-9.4               
[118] ggrepel_0.9.1                 grid_4.0.3                    fastmatch_1.1-0              
[121] tools_4.0.3                   future.apply_1.7.0            rstudioapi_0.13              
[124] foreach_1.5.1                 gridExtra_2.3                 farver_2.0.3                 
[127] Rtsne_0.15                    ggraph_2.0.4                  digest_0.6.27                
[130] rvcheck_0.1.8                 BiocManager_1.30.10           proto_1.0.0                  
[133] Rcpp_1.0.6                    BiocVersion_3.12.0            later_1.1.0.1                
[136] RcppAnnoy_0.0.18              shinyWidgets_0.5.5            httr_1.4.2                   
[139] rsconnect_0.8.16              colorspace_2.0-0              tensor_1.5                   
[142] fs_1.5.0                      reticulate_1.18               splines_4.0.3                
[145] uwot_0.1.10                   spatstat.utils_1.20-2         graphlayouts_0.7.1           
[148] plotly_4.9.3                  sessioninfo_1.1.1             xtable_1.8-4                 
[151] jsonlite_1.7.2                spatstat_1.64-1               tidygraph_1.2.0              
[154] testthat_3.0.1                R6_2.5.0                      gsubfn_0.7                   
[157] pillar_1.4.7                  htmltools_0.5.1               mime_0.9                     
[160] glue_1.4.2                    fastmap_1.0.1                 clusterProfiler_3.18.0       
[163] DT_0.17                       BiocParallel_1.24.1           interactiveDisplayBase_1.28.0
[166] codetools_0.2-18              fgsea_1.16.0                  pkgbuild_1.2.0               
[169] lattice_0.20-41               sqldf_0.4-11                  curl_4.3                     
[172] leiden_0.3.6                  gtools_3.8.2                  ReactomePA_1.34.0            
[175] GO.db_3.12.1                  survival_3.2-7                rmarkdown_2.6                
[178] parsedate_1.2.0               desc_1.2.0                    munsell_0.5.0                
[181] DO.db_2.9                     iterators_1.0.13              reshape2_1.4.4               
[184] gtable_0.3.0                  msigdbr_7.2.1     

Any insight as to why?

Thanks

MarcElosua commented 3 years ago

Hi @kolabx

I believe this error might be due to the tibble version you are running. I am looking into it and will get back to you as soon as I have a fix! thanks for reporting this, Marc

MarcElosua commented 3 years ago

Hi @kolabx The bug should now be fixed!

alissacg commented 3 years ago

Hi @MarcElosua, I'm still getting this error message using SPOTlight 0.1.3: <error/tibble_error_already_has_rownames> .data must be a data frame without row names. Backtrace: █

  1. ├─SPOTlight::spotlight_deconvolution(...)
  2. │ └─SPOTlight::topic_profile_per_cluster_nmf(...)
  3. │ └─%>%(...)
  4. ├─base::as.matrix(.)
  5. └─tibble::column_to_rownames(., clust_vr)

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

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.0/Resources/lib/libRlapack.dylib

Random number generation: RNG: Mersenne-Twister Normal: Inversion Sample: Rounding

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] parallel stats graphics grDevices utils datasets methods base

other attached packages: [1] edgeR_3.30.3 limma_3.44.3 Matrix_1.2-18 NMF_0.23.0
[5] Biobase_2.48.0 BiocGenerics_0.34.0 cluster_2.1.0 rngtools_1.5
[9] pkgmaker_0.31.1 registry_0.5-1 patchwork_1.1.1 cowplot_1.1.1
[13] SeuratData_0.2.1 forcats_0.5.0 stringr_1.4.0 purrr_0.3.4
[17] readr_1.3.1 tidyr_1.1.2 tibble_3.0.5 ggplot2_3.3.3
[21] tidyverse_1.3.0.9000 SPOTlight_0.1.3 dplyr_1.0.3 Seurat_3.2.3

MarcElosua commented 3 years ago

Hi @alissacg , Can you please try installing SPOTlight from the devel branch: devtools::install_github("https://github.com/MarcElosua/SPOTlight", ref = "devel") The issue should be adressed and functional there! Thanks for reporting the issue, Marc

MarcElosua commented 3 years ago

This bug should be fixed in the latest version