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

kegg_pathway_annotations fails with uninformative error #113

Open
danhalligan-la opened this issue Nov 3, 2024 · 0 comments
Open

kegg_pathway_annotations fails with uninformative error #113

danhalligan-la opened this issue Nov 3, 2024 · 0 comments

Comments

@danhalligan-la
Copy link

danhalligan-la commented Nov 3, 2024

Note sure exactly what is going wrong here, so have struggled to debug.

> library("OmnipathR")
> kegg_pathway_annotations()
[2024-11-03 10:14:46] [SUCCESS] [OmnipathR] KEGG (www.genome.jp): loaded 555 records from cache
[2024-11-03 10:14:47] [SUCCESS] [OmnipathR] UniProt (rest.uniprot.org): downloaded 2 records
Error in `pmap()`:
ℹ In index: 1.
Caused by error in `UseMethod()`:
! no applicable method for 'rename' applied to an object of class "list"
Run `rlang::last_trace()` to see where the error occurred.

Here's the last_trace

> rlang::last_trace()
<error/purrr_error_indexed>
Error in `pmap()`:
ℹ In index: 1.
Caused by error in `UseMethod()`:
! no applicable method for 'rename' applied to an object of class "list"
---
Backtrace:
     ▆
  1. ├─OmnipathR::kegg_pathway_annotations()
  2. │ └─pathways %<>% ...
  3. ├─. %||% kegg_pathways_download()
  4. ├─OmnipathR::kegg_pathways_download()
  5. │ └─... %>% kegg_simplify(simplify = simplify)
  6. ├─OmnipathR:::kegg_simplify(., simplify = simplify)
  7. ├─dplyr::bind_rows(.)
  8. │ └─rlang::list2(...)
  9. ├─purrr::pmap(...)
 10. │ └─purrr:::pmap_("list", .l, .f, ..., .progress = .progress)
 11. │   ├─purrr:::with_indexed_errors(...)
 12. │   │ └─base::withCallingHandlers(...)
 13. │   ├─purrr:::call_with_cleanup(...)
 14. │   └─OmnipathR (local) .f(id = .l[[1L]][[i]], name = .l[[2L]][[i]], ...)
 15. │     ├─... %>% ...
 16. │     └─OmnipathR::kegg_pathway_download(...)
 17. │       └─OmnipathR::kegg_process(entries, relations, max_expansion, simplify)
 18. │         └─OmnipathR::get_db("up_gs", organism = 9606)
 19. │           └─OmnipathR::load_db(key, param = param)
 20. │             ├─rlang::exec(loader, !!!param)
 21. │             └─OmnipathR (local) `<fn>`(organism = 9606, to = "genesymbol")
 22. │               └─... %>% trim_and_distinct
 23. ├─OmnipathR:::null_or_call(., mutate, pathway = name, pathway_id = id)
 24. │ └─value %>% is.null %>% if (NULL) fun(value, ...)
 25. ├─OmnipathR:::trim_and_distinct(.)
 26. │ └─d %>% mutate(across(everything(), str_trim)) %>% distinct
 27. ├─dplyr::distinct(.)
 28. ├─dplyr::mutate(., across(everything(), str_trim))
 29. ├─dplyr::filter(., !is.na(From) & !is.na(To))
 30. ├─tidyr::separate_rows(., To, sep = "[; ]")
 31. ├─tidyr::separate_rows(., From, sep = "[; ]")
 32. ├─dplyr::mutate(., From = strip_semicol(From), To = strip_semicol(To))
 33. └─dplyr::rename(., From = 1, To = 2)
Run rlang::last_trace(drop = FALSE) to see 4 hidden frames.

This is with the latest (GitHub) version: 3.13.28. Here's the session info.

> sessionInfo()
R version 4.4.2 (2024-10-31)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 24.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.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: Etc/UTC
tzcode source: system (glibc)

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

other attached packages:
[1] OmnipathR_3.13.28

loaded via a namespace (and not attached):
 [1] xfun_0.49           tzdb_0.4.0          vctrs_0.6.5        
 [4] tools_4.4.2         generics_0.1.3      curl_5.2.3         
 [7] tibble_3.2.1        fansi_1.0.6         RSQLite_2.3.7      
[10] blob_1.2.4          pkgconfig_2.0.3     R.oo_1.27.0        
[13] checkmate_2.3.2     readxl_1.4.3        lifecycle_1.0.4    
[16] compiler_4.4.2      stringr_1.5.1       progress_1.2.3     
[19] htmltools_0.5.8.1   yaml_2.3.10         later_1.3.2        
[22] pillar_1.9.0        crayon_1.5.3        tidyr_1.3.1        
[25] R.utils_2.12.3      cachem_1.1.0        tidyselect_1.2.1   
[28] rvest_1.0.4         zip_2.3.1           digest_0.6.37      
[31] stringi_1.8.4       dplyr_1.1.4         purrr_1.0.2        
[34] fastmap_1.2.0       cli_3.6.3           logger_0.4.0       
[37] magrittr_2.0.3      XML_3.99-0.17       utf8_1.2.4         
[40] readr_2.1.5         withr_3.0.2         prettyunits_1.2.0  
[43] backports_1.5.0     rappdirs_0.3.3      bit64_4.5.2        
[46] lubridate_1.9.3     timechange_0.3.0    rmarkdown_2.28     
[49] httr_1.4.7          igraph_2.1.1        bit_4.5.0          
[52] cellranger_1.1.0    R.methodsS3_1.8.2   hms_1.1.3          
[55] memoise_2.0.1       evaluate_1.0.1      knitr_1.48         
[58] rlang_1.1.4         Rcpp_1.0.13         glue_1.8.0         
[61] DBI_1.2.3           selectr_0.4-2       BiocManager_1.30.25
[64] xml2_1.3.6          renv_1.0.11         vroom_1.6.5        
[67] jsonlite_1.8.9      R6_2.5.1   
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

1 participant