egeulgen / pathfindR

pathfindR: Enrichment Analysis Utilizing Active Subnetworks
https://egeulgen.github.io/pathfindR/
Other
177 stars 25 forks source link

HTML report not generated #171

Closed JureFabjan closed 11 months ago

JureFabjan commented 11 months ago

Describe the bug I run pathfindR with rat gene set. I used to get the HTML report with term visualizations, but now I cannot make the code make them for me. Furthemore, if I exclude the output_dir argument, no output directory is created. There is no error, and I still get the data frame and graph returned by the function.

To Reproduce path_to_pin_file <- get_pin_file(org = "Rattus_norvegicus") rno_string_df <- read.table(path_to_pin_file, header = FALSE) colnames(rno_string_df) = c("A", "pp", "B") rno_string_df <- rno_string_df[!(rno_string_df$A == rno_string_df$B), ] rno_string_df <- unique(t(apply(rno_string_df[c("A", "B")], 1, sort))) rno_string_df <- data.frame(A = rno_string_df[, 1], pp = "pp", B = rno_string_df[, 2]) write.table(rno_string_df, file = paste0(getwd(), "/Temp/RNor_PIN.sif"), col.names = FALSE, row.names = FALSE, sep = "\t", quote = FALSE)

gsets_list <- get_gene_sets_list(source = "MSigDB", species = "Rattus norvegicus", collection = "C5")

input_data <- data.frame(Gene_Symbol = results$SHORT_NAME, Change_Values = results$logFC, p_values = results$adj.P.Val) %>% dplyr::filter(Gene_Symbol != "")})

pfind_output <- run_pathfindR(input = input_data, convert2alias = FALSE, gene_sets = "Custom", custom_genes = gsets_list$gene_sets, custom_descriptions = gsets_list$descriptions, pin_name_path = normalizePath("./Temp/RNor_PIN.sif"), adj_method = "fdr", outputdir=normalizePath(paste0("./PathfindR", "compound")), iterations=20)

Expected behavior When looking at the output folder I expected to find an active_snw_searches and term_visualizations folders, and HTML report files. Instead, I find a populated active_snw_searches folder only.

Desktop (please complete the following information):

R Session Information: R version 4.2.3 (2023-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.6 LTS

Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3 LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so

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

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

other attached packages: [1] DT_0.28 plyr_1.8.8 aws.s3_0.3.21
[4] data.table_1.14.8 writexl_1.4.2 pathfindR_2.1.0
[7] pathfindR.data_2.0.0 org.Rn.eg.db_3.16.0 AnnotationDbi_1.60.2 [10] IRanges_2.32.0 S4Vectors_0.36.2 pheatmap_1.0.12
[13] RColorBrewer_1.1-3 colorspace_2.1-0 gplots_3.1.3
[16] Polychrome_1.5.1 dendextend_1.17.1 ggthemes_4.2.4
[19] edgeR_3.40.2 y BiocParallel_1.32.6 [22] genefilter_1.80.3 mgcv_1.8-42 nlme_3.1-162
[25] ggsci_3.0.0 gridExtra_2.3 reshape2_1.4.4
[28] ggvenn_0.1.10 plotly_4.10.2 Rtsne_0.16
[31] statmod_1.5.0 affy_1.76.0 Biobase_2.58.0 [34] BiocGenerics_0.44.0 limma_3.54.2 lubridate_1.9.2 [37] forcats_1.0.0 stringr_1.5.0 dplyr_1.1.2 [40] purrr_1.0.2 readr_2.1.4 tidyr_1.3.0 [43] tibble_3.2.1 ggplot2_3.4.2 tidyverse_2.0.0

loaded via a namespace (and not attached): [1] utf8_1.2.3 tidyselect_1.2.0
[3] RSQLite_2.3.1 htmlwidgets_1.6.2
[5] devtools_2.4.5 aws.signature_0.6.0
[7] munsell_0.5.0 ragg_1.2.5
[9] codetools_0.2-19 preprocessCore_1.60.2
[11] miniUI_0.1.1.1 withr_2.5.0
[13] knitr_1.43 rstudioapi_0.15.0
[15] MatrixGenerics_1.10.0 labeling_0.4.2
[17] GenomeInfoDbData_1.2.9 polyclip_1.10-4
[19] bit64_4.0.5 farver_2.1.1
[21] vctrs_0.6.3 generics_0.1.3
[23] xfun_0.40 timechange_0.2.0
[25] fastcluster_1.2.3 affxparser_1.70.0
[27] R6_2.5.1 doParallel_1.0.17
[29] GenomeInfoDb_1.34.9 graphlayouts_1.0.0
[31] locfit_1.5-9.8 bitops_1.0-7
[33] cachem_1.0.8 DelayedArray_0.24.0
[35] promises_1.2.1 scales_1.2.1
[37] vroom_1.6.3 ggraph_2.1.0
[39] gtable_0.3.3 processx_3.8.2
[41] tidygraph_1.2.3 tictoc_1.2
[43] rlang_1.1.1 systemfonts_1.0.4
[45] scatterplot3d_0.3-44 splines_4.2.3
[47] lazyeval_0.2.2 BiocManager_1.30.22
[49] yaml_2.3.7 httpuv_1.6.11
[51] tools_4.2.3 usethis_2.2.2
[53] affyio_1.68.0 ellipsis_0.3.2
[55] ff_4.0.9 sessioninfo_1.2.2
[57] Rcpp_1.0.11 base64enc_0.1-3
[59] zlibbioc_1.44.0 RCurl_1.98-1.12
[61] ps_1.7.5 prettyunits_1.1.1
[63] viridis_0.6.4 urlchecker_1.0.1
[65] SummarizedExperiment_1.28.0 ggrepel_0.9.3
[67] fs_1.6.3 factoextra_1.0.7
[69] magrittr_2.0.3 magick_2.7.5
[71] matrixStats_1.0.0 pkgload_1.3.2.1
[73] hms_1.1.3 mime_0.12
[75] evaluate_0.21 xtable_1.8-4
[77] XML_3.99-0.14 readxl_1.4.3
[79] compiler_4.2.3 KernSmooth_2.23-20
[81] crayon_1.5.2 aws.ec2metadata_0.2.0
[83] htmltools_0.5.6 later_1.3.1
[85] tzdb_0.4.0 oligo_1.62.2
[87] DBI_1.1.3 tweenr_2.0.2
[89] MASS_7.3-58.2 Matrix_1.6-0
[91] cli_3.6.1 pak_0.5.1
[93] parallel_4.2.3 igraph_1.5.1
[95] GenomicRanges_1.50.2 pkgconfig_2.0.3
[97] xml2_1.3.5 foreach_1.5.2
[99] annotate_1.76.0 XVector_0.38.0
[101] callr_3.7.3 digest_0.6.33
[103] Biostrings_2.66.0 rmarkdown_2.23
[105] cellranger_1.1.0 curl_5.0.1
[107] shiny_1.7.4.1 gtools_3.9.4
[109] lifecycle_1.0.3 jsonlite_1.8.7
[111] viridisLite_0.4.2 fansi_1.0.4
[113] pillar_1.9.0 lattice_0.20-45
[115] KEGGREST_1.38.0 fastmap_1.1.1
[117] httr_1.4.6 pkgbuild_1.4.2
[119] survival_3.5-3 glue_1.6.2
[121] remotes_2.4.2.1 png_0.1-8
[123] iterators_1.0.14 bit_4.0.5
[125] ggforce_0.4.1 stringi_1.7.12
[127] profvis_0.3.8 blob_1.2.4
[129] textshaping_0.3.6 oligoClasses_1.60.0
[131] caTools_1.18.2 memoise_2.0.1

Additional context java --version output:

openjdk 11.0.19 2023-04-18 OpenJDK Runtime Environment (build 11.0.19+7-post-Ubuntu-0ubuntu118.04.1) OpenJDK 64-Bit Server VM (build 11.0.19+7-post-Ubuntu-0ubuntu118.04.1, mixed mode, sharing)

egeulgen commented 11 months ago

What you describe is the expected behavior for pathfindR versions > 2.0. As described in the latest documentation, as of this version, pathfindR no longer creates HTML reports and the output directory is optional. You may create term visualizations using visualize_terms()

egeulgen commented 11 months ago

@JureFabjan As you may have realized, I just created a PR to bring back HTML report generation. Once all tests pass and it's merged in, you can install and use the development version from GitHub via devtools:

install.packages("devtools") # if you have not installed "devtools"
devtools::install_github("egeulgen/pathfindR")