pathfindR icon indicating copy to clipboard operation
pathfindR copied to clipboard

Cannot find the logo file

Open fazeliniah opened this issue 3 years ago • 12 comments

Thank you so much for developing this great tool. I have been using pathfindR for few weeks now. It was working smoothly on R-4.1.2. I have recently updated the R to R-4.2.1 and am getting a new error. Can you please look into this?

Downloading pathway diagrams of 10 KEGG pathways

|=====================================================================================================| 100% Saving colored pathway diagrams of 0 KEGG pathways

|.................................. | 33% inline R code fragments

Error in knitr::include_graphics(logo_path) : Cannot find the file(s): "../extdata/logo.png"

fazeliniah avatar Sep 30 '22 17:09 fazeliniah

can you share the output of sessionInfo()?

egeulgen avatar Oct 01 '22 02:10 egeulgen

R version 4.2.1 (2022-06-23 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 14393)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252

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

other attached packages: [1] SummarizedExperiment_1.26.1 Biobase_2.56.0 GenomicRanges_1.48.0 GenomeInfoDb_1.32.4
[5] IRanges_2.30.1 S4Vectors_0.34.0 BiocGenerics_0.42.0 MatrixGenerics_1.8.1
[9] matrixStats_0.62.0 limma_3.52.4

loaded via a namespace (and not attached): [1] httr_1.4.4 BiocSingular_1.12.0 tidyr_1.2.1 jsonlite_1.8.0
[5] viridisLite_0.4.1 DelayedMatrixStats_1.18.1 gprofiler2_0.2.1 shiny_1.7.2
[9] assertthat_0.2.1 dqrng_0.3.0 GenomeInfoDbData_1.2.8 yaml_2.3.5
[13] ggrepel_0.9.1 pillar_1.8.1 lattice_0.20-45 glue_1.6.2
[17] beachmat_2.12.0 digest_0.6.29 promises_1.2.0.1 XVector_0.36.0
[21] colorspace_2.0-3 cowplot_1.1.1 htmltools_0.5.3 httpuv_1.6.6
[25] Matrix_1.5-1 plyr_1.8.7 pkgconfig_2.0.3 ggcorrplot_0.1.4
[29] zlibbioc_1.42.0 purrr_0.3.4 xtable_1.8-4 scales_1.2.1
[33] ScaledMatrix_1.4.1 later_1.3.0 tzdb_0.3.0 BiocParallel_1.30.3
[37] tibble_3.1.8 generics_0.1.3 ggplot2_3.3.6 ellipsis_0.3.2
[41] lazyeval_0.2.2 cli_3.4.1 magrittr_2.0.3 mime_0.12
[45] evaluate_0.16 fansi_1.0.3 tools_4.2.1 data.table_1.14.2
[49] hms_1.1.2 EnhancedVolcano_1.14.0 lifecycle_1.0.2 stringr_1.4.1
[53] plotly_4.10.0 munsell_0.5.0 DelayedArray_0.22.0 irlba_2.3.5
[57] compiler_4.2.1 rsvd_1.0.5 rlang_1.0.6 grid_4.2.1
[61] RCurl_1.98-1.8 rstudioapi_0.14 htmlwidgets_1.5.4 crosstalk_1.2.0
[65] rmarkdown_2.16 bitops_1.0-7 gtable_0.3.1 codetools_0.2-18
[69] DBI_1.1.3 reshape2_1.4.4 PCAtools_2.8.0 R6_2.5.1
[73] knitr_1.40 dplyr_1.0.10 fastmap_1.1.0 utf8_1.2.2
[77] readr_2.1.2 stringi_1.7.8 parallel_4.2.1 Rcpp_1.0.9
[81] vctrs_0.4.1 xfun_0.33 tidyselect_1.1.2 sparseMatrixStats_1.8.0

fazeliniah avatar Oct 03 '22 19:10 fazeliniah

what is the version of pathfindR you're using? can you share sessionInfo() after loading the library?

egeulgen avatar Oct 04 '22 07:10 egeulgen

So sorry for the mishap. I am using 1.6.4. Here is the new sessioninfo.

sessionInfo() R version 4.2.1 (2022-06-23 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 14393)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252

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

other attached packages: [1] gprofiler2_0.2.1 pcaMethods_1.88.0 bpca_1.3-4 rgl_0.110.2
[5] scatterplot3d_0.3-42 forcats_0.5.2 stringr_1.4.1 dplyr_1.0.10
[9] purrr_0.3.4 readr_2.1.2 tidyr_1.2.1 tibble_3.1.8
[13] tidyverse_1.3.2 pheatmap_1.0.12 EnhancedVolcano_1.14.0 PCAtools_2.8.0
[17] ggrepel_0.9.1 plotly_4.10.0 ggcorrplot_0.1.4 corrplot_0.92
[21] cowplot_1.1.1 ggpubr_0.4.0 gridExtra_2.3 ggplot2_3.3.6
[25] magrittr_2.0.3 knitr_1.40 pathfindR_1.6.4 pathfindR.data_1.1.2
[29] SummarizedExperiment_1.26.1 Biobase_2.56.0 GenomicRanges_1.48.0 GenomeInfoDb_1.32.4
[33] IRanges_2.30.1 S4Vectors_0.34.0 BiocGenerics_0.42.0 MatrixGenerics_1.8.1
[37] matrixStats_0.62.0 limma_3.52.4

loaded via a namespace (and not attached): [1] readxl_1.4.1 backports_1.4.1 systemfonts_1.0.4 plyr_1.8.7
[5] igraph_1.3.5 lazyeval_0.2.2 BiocParallel_1.30.3 crosstalk_1.2.0
[9] digest_0.6.29 foreach_1.5.2 htmltools_0.5.3 magick_2.7.3
[13] viridis_0.6.2 fansi_1.0.3 memoise_2.0.1 ScaledMatrix_1.4.1
[17] googlesheets4_1.0.1 doParallel_1.0.17 tzdb_0.3.0 Biostrings_2.64.1
[21] graphlayouts_0.8.1 modelr_0.1.9 vroom_1.5.7 colorspace_2.0-3
[25] blob_1.2.3 rvest_1.0.3 textshaping_0.3.6 haven_2.5.1
[29] xfun_0.33 crayon_1.5.2 RCurl_1.98-1.8 jsonlite_1.8.0
[33] iterators_1.0.14 glue_1.6.2 polyclip_1.10-0 gtable_0.3.1
[37] gargle_1.2.1 zlibbioc_1.42.0 XVector_0.36.0 DelayedArray_0.22.0
[41] car_3.1-0 BiocSingular_1.12.0 abind_1.4-5 scales_1.2.1
[45] DBI_1.1.3 rstatix_0.7.0 Rcpp_1.0.9 viridisLite_0.4.1
[49] xtable_1.8-4 dqrng_0.3.0 bit_4.0.4 rsvd_1.0.5
[53] htmlwidgets_1.5.4 httr_1.4.4 RColorBrewer_1.1-3 ellipsis_0.3.2
[57] pkgconfig_2.0.3 farver_2.1.1 sass_0.4.2 dbplyr_2.2.1
[61] utf8_1.2.2 AnnotationDbi_1.58.0 labeling_0.4.2 tidyselect_1.1.2
[65] rlang_1.0.6 reshape2_1.4.4 later_1.3.0 cachem_1.0.6
[69] munsell_0.5.0 cellranger_1.1.0 tools_4.2.1 cli_3.4.1
[73] RSQLite_2.2.17 generics_0.1.3 broom_1.0.1 evaluate_0.16
[77] fastmap_1.1.0 ragg_1.2.2 yaml_2.3.5 org.Hs.eg.db_3.15.0
[81] bit64_4.0.5 fs_1.5.2 tidygraph_1.2.2 KEGGREST_1.36.3
[85] ggraph_2.0.6 sparseMatrixStats_1.8.0 mime_0.12 xml2_1.3.3
[89] compiler_4.2.1 rstudioapi_0.14 png_0.1-7 ggsignif_0.6.3
[93] reprex_2.0.2 tweenr_2.0.2 bslib_0.4.0 stringi_1.7.8
[97] highr_0.9 lattice_0.20-45 Matrix_1.5-1 vctrs_0.4.1
[101] pillar_1.8.1 lifecycle_1.0.2 jquerylib_0.1.4 data.table_1.14.2
[105] bitops_1.0-7 irlba_2.3.5 httpuv_1.6.6 R6_2.5.1
[109] promises_1.2.0.1 codetools_0.2-18 MASS_7.3-57 assertthat_0.2.1
[113] withr_2.5.0 GenomeInfoDbData_1.2.8 parallel_4.2.1 hms_1.1.2
[117] grid_4.2.1 beachmat_2.12.0 rmarkdown_2.16 DelayedMatrixStats_1.18.1 [121] carData_3.0-5 googledrive_2.0.0 ggforce_0.3.4 base64enc_0.1-3
[125] shiny_1.7.2 lubridate_1.8.0

fazeliniah avatar Oct 04 '22 14:10 fazeliniah

This is odd. Can you share the command you're using and the entire console output?

egeulgen avatar Oct 04 '22 16:10 egeulgen

I am using a very generic command for PathfindR. It works smoothly with older version of R. Here is the script:

genes_of_interest_pathfindr <- stats_df %>%dplyr::filter(adj.P.Val < 0.05 ,abs(logFC) > 0.5) %>% dplyr::select(Gene,logFC,adj.P.Val)

#knitr::kable(head(genes_of_interest_pathfindr)) output_df <- run_pathfindR(genes_of_interest_pathfindr, plot_enrichment_chart = FALSE)

term_gene_heatmap <- term_gene_heatmap(output_df, use_description = TRUE) + theme(axis.text=element_text(size=5)) enrich_chart <- enrichment_chart(output_df)

#term_gene_graph <- term_gene_graph(output_df)

pathfindR_plots <- plot_grid(enrich_chart, term_gene_heatmap, align = "v", nrow = 2, rel_heights = c(1, 1/3))

pathfindR_plots

fazeliniah avatar Oct 04 '22 17:10 fazeliniah

I'm assuming you're getting the error during run_pathfindR() can you share the entire console output for that command?

egeulgen avatar Oct 05 '22 08:10 egeulgen

run_pathfindR(genes_of_interest_pathfindr, plot_enrichment_chart = FALSE) n_processes is set to iterations because iterations < n_processes There is already a directory named "pathfindR_Results". Writing the result to "pathfindR_Results(9)" not to overwrite any previous results.

Testing input

The input looks OK

Processing input. Converting gene symbols,

      if necessary (and if human gene symbols provided)

Number of genes provided in input: 414 Number of genes in input after p-value filtering: 414 Could not find any interactions for 10 (2.42%) genes in the PIN Final number of genes in input: 404

Performing Active Subnetwork Search and Enrichment

Processing the enrichment results over all iterations

Annotating involved genes and visualizing enriched terms

Downloading pathway diagrams of 10 KEGG pathways

| | 0%Cannot download KGML file for: hsa03008 Here's the original error message: there is no package called ‘KEGGgraph’ |=========== | 10%Cannot download KGML file for: hsa04914 Here's the original error message: there is no package called ‘KEGGgraph’ |====================== | 20%Cannot download KGML file for: hsa03420 Here's the original error message: there is no package called ‘KEGGgraph’ |================================= | 30%Cannot download KGML file for: hsa03440 Here's the original error message: there is no package called ‘KEGGgraph’ |============================================ | 40%Cannot download KGML file for: hsa03030 Here's the original error message: there is no package called ‘KEGGgraph’ |======================================================== | 50%Cannot download KGML file for: hsa03430 Here's the original error message: there is no package called ‘KEGGgraph’ |=================================================================== | 60%Cannot download KGML file for: hsa05203 Here's the original error message: there is no package called ‘KEGGgraph’ |============================================================================== | 70%Cannot download KGML file for: hsa03460 Here's the original error message: there is no package called ‘KEGGgraph’ |========================================================================================= | 80%Cannot download KGML file for: hsa04217 Here's the original error message: there is no package called ‘KEGGgraph’ |==================================================================================================== | 90%Cannot download KGML file for: hsa04114 Here's the original error message: there is no package called ‘KEGGgraph’ |===============================================================================================================| 100% Saving colored pathway diagrams of 0 KEGG pathways

By default, the top 10 KEGG pathways are visualized Please use visualize_terms() if you'd like to plot all enriched pathways

Creating HTML report

processing file: results.Rmd |..................................... | 33% inline R code fragments

Quitting from lines 2-6 (results.Rmd) Error in knitr::include_graphics(logo_path) : Cannot find the file(s): "../extdata/logo.png"

fazeliniah avatar Oct 05 '22 20:10 fazeliniah

What is the output of system.file("extdata", "logo.png", package = "pathfindR")? It should be the path for the logo, but it seems that it somehow is returned as "../extdata/logo.png" on your system

egeulgen avatar Oct 06 '22 06:10 egeulgen

That's right. Not sure how to fix that :(

system.file("extdata", "logo.png", package = "pathfindR") [1] "C:/Users/fazeliniah/AppData/Local/R/win-library/4.2/pathfindR/extdata/logo.png"

fazeliniah avatar Oct 06 '22 14:10 fazeliniah

are you sure you have write permission under the current working directory?

egeulgen avatar Oct 06 '22 15:10 egeulgen

I started the Rstudio in "Run as Admin" mode and still get the same error. For now, I am switching back to R-4.1.2. It works with no issues.

fazeliniah avatar Oct 06 '22 15:10 fazeliniah