saezlab / decoupleR

R package to infer biological activities from omics data using a collection of methods.
https://saezlab.github.io/decoupleR/
GNU General Public License v3.0
176 stars 23 forks source link

get_dorothea return an error with latest version of dplyr #78

Closed pedriniedoardo closed 1 year ago

pedriniedoardo commented 1 year ago

Hello, I have experienced an issue with the function get_dorothea. If I use the package the configuration in the vignette

dplyr@1.0.10
tibble@3.1.8
tidyr@1.2.1

running get_dorethea is working fine

library(Seurat)
library(decoupleR)
library(dplyr)
library(tibble)
library(tidyr)

> net <- get_dorothea(organism='human', levels=c('A', 'B', 'C'))
[2023-04-05 02:58:31] [SUCCESS] [OmnipathR] Loaded 278830 interactions from cache.
> net
# A tibble: 32,275 × 4
   source confidence target   mor
   <chr>  <chr>      <chr>  <dbl>
 1 MYC    A          TERT       1
 2 SMAD3  A          JUN        1
 3 SMAD4  A          JUN        1
 4 SP1    A          ALDOA      1
 5 TP53   A          IGF1R     -1
 6 ZBTB16 A          CCNA2     -1
 7 RUNX1  A          IL3       -1
 8 STAT1  A          CDKN1A     1
 9 STAT3  A          CDKN1A     1
10 RELA   A          ABCB1      1
# ℹ 32,265 more rows
# ℹ Use `print(n = ...)` to see more rows

> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 22.04.2 LTS

Matrix products: default
BLAS/LAPACK: /home/edo/miniconda3/envs/env_R4.2_conda/lib/libopenblasp-r0.3.21.so

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

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

other attached packages:
[1] tidyr_1.2.1        tibble_3.2.1       dplyr_1.0.10       decoupleR_2.4.0    SeuratObject_4.1.3 Seurat_4.3.0      

loaded via a namespace (and not attached):
  [1] Rtsne_0.16             colorspace_2.1-0       deldir_1.0-6           ellipsis_0.3.2         ggridges_0.5.4         rstudioapi_0.14       
  [7] spatstat.data_3.0-1    leiden_0.4.3           listenv_0.9.0          bit64_4.0.5            ggrepel_0.9.3          fansi_1.0.4           
 [13] xml2_1.3.3             codetools_0.2-19       splines_4.2.1          knitr_1.42             polyclip_1.10-4        jsonlite_1.8.4        
 [19] ica_1.0-3              cluster_2.1.4          png_0.1-8              uwot_0.1.14            shiny_1.7.4            sctransform_0.3.5     
 [25] spatstat.sparse_3.0-1  readr_2.1.4            BiocManager_1.30.20    compiler_4.2.1         httr_1.4.5             backports_1.4.1       
 [31] Matrix_1.5-4           fastmap_1.1.1          lazyeval_0.2.2         cli_3.6.1              later_1.3.0            prettyunits_1.1.1     
 [37] htmltools_0.5.5        tools_4.2.1            igraph_1.4.1           gtable_0.3.3           glue_1.6.2             RANN_2.6.1            
 [43] reshape2_1.4.4         rappdirs_0.3.3         Rcpp_1.0.10            scattermore_0.8        cellranger_1.1.0       vctrs_0.6.1           
 [49] spatstat.explore_3.1-0 nlme_3.1-162           progressr_0.13.0       lmtest_0.9-40          spatstat.random_3.1-4  xfun_0.38             
 [55] OmnipathR_3.5.25       stringr_1.5.0          globals_0.16.2         rvest_1.0.3            mime_0.12              miniUI_0.1.1.1        
 [61] lifecycle_1.0.3        irlba_2.3.5.1          renv_0.15.5            goftest_1.2-3          future_1.32.0          MASS_7.3-58.3         
 [67] zoo_1.8-11             scales_1.2.1           vroom_1.6.1            hms_1.1.3              promises_1.2.0.1       spatstat.utils_3.0-2  
 [73] parallel_4.2.1         RColorBrewer_1.1-3     yaml_2.3.7             curl_5.0.0             reticulate_1.28        pbapply_1.7-0         
 [79] gridExtra_2.3          ggplot2_3.4.2          stringi_1.7.12         checkmate_2.1.0        rlang_1.1.0            pkgconfig_2.0.3       
 [85] matrixStats_0.63.0     evaluate_0.20          lattice_0.20-45        ROCR_1.0-11            purrr_1.0.1            tensor_1.5            
 [91] patchwork_1.1.2        htmlwidgets_1.6.2      bit_4.0.5              cowplot_1.1.1          tidyselect_1.2.0       parallelly_1.35.0     
 [97] RcppAnnoy_0.0.20       plyr_1.8.8             logger_0.2.2           magrittr_2.0.3         R6_2.5.1               generics_0.1.3        
[103] DBI_1.1.3              withr_2.5.0            pillar_1.9.0           fitdistrplus_1.1-8     survival_3.5-5         abind_1.4-5           
[109] sp_1.6-0               future.apply_1.10.0    crayon_1.5.2           KernSmooth_2.23-20     utf8_1.2.3             spatstat.geom_3.1-0   
[115] plotly_4.10.1          rmarkdown_2.21         tzdb_0.3.0             progress_1.2.2         readxl_1.4.2           grid_4.2.1            
[121] data.table_1.14.8      digest_0.6.31          xtable_1.8-4           httpuv_1.6.9           munsell_0.5.0          viridisLite_0.4.1

But with the latest version of dplyr (1.1.1) it fails:

library(Seurat)
library(decoupleR)
library(dplyr)
library(tibble)
library(tidyr)

> net <- get_dorothea(organism='human', levels=c('A', 'B', 'C'))
Error in `mutate()`:
ℹ In argument: `n_references = ifelse(...)`.
Caused by error in `map()`:
ℹ In index: 1.
Caused by error in `.f()`:
! Arguments in `...` must be passed by position, not name.
✖ Problematic argument:
• outsep = outsep
Run `rlang::last_trace()` to see where the error occurred.

> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 22.04.2 LTS

Matrix products: default
BLAS/LAPACK: /home/edo/miniconda3/envs/env_R4.2_conda/lib/libopenblasp-r0.3.21.so

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

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

other attached packages:
[1] tidyr_1.2.1        tibble_3.2.1       dplyr_1.1.1        decoupleR_2.4.0    SeuratObject_4.1.3 Seurat_4.3.0      

loaded via a namespace (and not attached):
  [1] Rtsne_0.16             colorspace_2.1-0       deldir_1.0-6           ellipsis_0.3.2         ggridges_0.5.4         rstudioapi_0.14       
  [7] spatstat.data_3.0-1    leiden_0.4.3           listenv_0.9.0          bit64_4.0.5            ggrepel_0.9.3          fansi_1.0.4           
 [13] xml2_1.3.3             codetools_0.2-19       splines_4.2.1          knitr_1.42             polyclip_1.10-4        jsonlite_1.8.4        
 [19] ica_1.0-3              cluster_2.1.4          png_0.1-8              uwot_0.1.14            shiny_1.7.4            sctransform_0.3.5     
 [25] spatstat.sparse_3.0-1  readr_2.1.4            BiocManager_1.30.20    compiler_4.2.1         httr_1.4.5             backports_1.4.1       
 [31] Matrix_1.5-4           fastmap_1.1.1          lazyeval_0.2.2         cli_3.6.1              later_1.3.0            prettyunits_1.1.1     
 [37] htmltools_0.5.5        tools_4.2.1            igraph_1.4.1           gtable_0.3.3           glue_1.6.2             RANN_2.6.1            
 [43] reshape2_1.4.4         rappdirs_0.3.3         Rcpp_1.0.10            scattermore_0.8        cellranger_1.1.0       vctrs_0.6.1           
 [49] spatstat.explore_3.1-0 nlme_3.1-162           progressr_0.13.0       lmtest_0.9-40          spatstat.random_3.1-4  xfun_0.38             
 [55] OmnipathR_3.5.25       stringr_1.5.0          globals_0.16.2         rvest_1.0.3            mime_0.12              miniUI_0.1.1.1        
 [61] lifecycle_1.0.3        irlba_2.3.5.1          renv_0.15.5            goftest_1.2-3          future_1.32.0          MASS_7.3-58.3         
 [67] zoo_1.8-11             scales_1.2.1           vroom_1.6.1            hms_1.1.3              promises_1.2.0.1       spatstat.utils_3.0-2  
 [73] parallel_4.2.1         RColorBrewer_1.1-3     yaml_2.3.7             curl_5.0.0             reticulate_1.28        pbapply_1.7-0         
 [79] gridExtra_2.3          ggplot2_3.4.2          stringi_1.7.12         checkmate_2.1.0        rlang_1.1.0            pkgconfig_2.0.3       
 [85] matrixStats_0.63.0     evaluate_0.20          lattice_0.20-45        ROCR_1.0-11            purrr_1.0.1            tensor_1.5            
 [91] patchwork_1.1.2        htmlwidgets_1.6.2      bit_4.0.5              cowplot_1.1.1          tidyselect_1.2.0       parallelly_1.35.0     
 [97] RcppAnnoy_0.0.20       plyr_1.8.8             logger_0.2.2           magrittr_2.0.3         R6_2.5.1               generics_0.1.3        
[103] DBI_1.1.3              withr_2.5.0            pillar_1.9.0           fitdistrplus_1.1-8     survival_3.5-5         abind_1.4-5           
[109] sp_1.6-0               future.apply_1.10.0    crayon_1.5.2           KernSmooth_2.23-20     utf8_1.2.3             spatstat.geom_3.1-0   
[115] plotly_4.10.1          rmarkdown_2.21         tzdb_0.3.0             progress_1.2.2         readxl_1.4.2           grid_4.2.1            
[121] data.table_1.14.8      digest_0.6.31          xtable_1.8-4           httpuv_1.6.9           munsell_0.5.0          viridisLite_0.4.1
PauBadiaM commented 1 year ago

Hi @pedriniedoardo ,

Could you please try to install the latest version of OmnipathR and try again?

devtools::install_github('saezlab/OmnipathR')
pedriniedoardo commented 1 year ago

thank you, now the function works even with the latest version of dplyr! thank you for the suggestion.