RajLabMSSM / echolocatoR

Automated statistical and functional fine-mapping pipeline with extensive API access to datasets.
https://rajlabmssm.github.io/echolocatoR
MIT License
34 stars 11 forks source link

Incorporating POLYFUN #130

Open JonnyBaseball opened 1 year ago

JonnyBaseball commented 1 year ago

1. Bug description

PolyFun is not installed. Reinstall echofinemap with PolyFun? This will automatically restart R. (y/n): Error in echofinemap::POLYFUN_install() : PolyFun is not installed.

Awesome package! Also thanks in advance for any help you can give me!

Expected behaviour

Your example echodata::BCST results included POLYFUN_SUSIE results.

2. Reproducible example

results <- echolocatoR::finemap_loci(

Console output

PolyFun is not installed. Reinstall echofinemap with PolyFun? This will automatically restart R. (y/n): Error in echofinemap::POLYFUN_install() : PolyFun is not installed.

Data

As set forth in the next comment, I tried to access Polyfun using your example data. There I also responded 'y' to option to install Polyfun.

If it would help to see my data, I can certainly upload a small sample. Note that there was no problem when I cut out all but "ABF" (not relevant since not binary), "SUSIE", and "FINEMAP". I used a GWAS generated using GSEM (with 6.7 million snps, munged down using MungeSumstats to 3.7 million due to multiallelic snps).

(If possible, upload a small sample of your data so that we can reproduce the bug on our end. If that's not possible, please at least include a screenshot of your data and other relevant details.)

3. Session info

(Add output of the R function utils::sessionInfo() below. This helps us assess version/OS conflicts which could be causing bugs.)

``` > utils::sessionInfo() R version 4.2.0 (2022-04-22) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Catalina 10.15.7 Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.2/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] stats4 stats graphics grDevices utils datasets methods base other attached packages: [1] snpStats_1.48.0 Matrix_1.5-3 survival_3.4-0 readr_2.1.3 GenomeInfoDb_1.34.3 IRanges_2.32.0 S4Vectors_0.36.0 [8] BiocGenerics_0.44.0 echolocatoR_2.0.3 loaded via a namespace (and not attached): [1] rappdirs_0.3.3 rtracklayer_1.58.0 GGally_2.1.2 [4] R.methodsS3_1.8.2 ragg_1.2.4 tidyr_1.2.1 [7] echoLD_0.99.8 ggplot2_3.4.0 bit64_4.0.5 [10] knitr_1.41 irlba_2.3.5.1 DelayedArray_0.24.0 [13] R.utils_2.12.2 data.table_1.14.6 rpart_4.1.19 [16] KEGGREST_1.38.0 RCurl_1.98-1.9 AnnotationFilter_1.22.0 [19] generics_0.1.3 GenomicFeatures_1.50.2 RSQLite_2.2.19 [22] proxy_0.4-27 bit_4.0.5 tzdb_0.3.0 [25] xml2_1.3.3 SummarizedExperiment_1.28.0 assertthat_0.2.1 [28] viridis_0.6.2 gargle_1.2.1 xfun_0.35 [31] hms_1.1.2 fansi_1.0.3 restfulr_0.0.15 [34] progress_1.2.2 dbplyr_2.2.1 readxl_1.4.1 [37] Rgraphviz_2.42.0 igraph_1.3.5 DBI_1.1.3 [40] htmlwidgets_1.5.4 reshape_0.8.9 downloadR_0.99.5 [43] purrr_0.3.5 ellipsis_0.3.2 dplyr_1.0.10 [46] ggnewscale_0.4.8 backports_1.4.1 biomaRt_2.54.0 [49] deldir_1.0-6 MatrixGenerics_1.10.0 MungeSumstats_1.7.2 [52] vctrs_0.5.1 Biobase_2.58.0 ensembldb_2.22.0 [55] cachem_1.0.6 withr_2.5.0 BSgenome_1.66.1 [58] checkmate_2.1.0 vroom_1.6.0 GenomicAlignments_1.34.0 [61] prettyunits_1.1.1 cluster_2.1.4 ape_5.6-2 [64] dir.expiry_1.6.0 lazyeval_0.2.2 crayon_1.5.2 [67] basilisk.utils_1.10.0 crul_1.3 pkgconfig_2.0.3 [70] labeling_0.4.2 nlme_3.1-160 ProtGenerics_1.30.0 [73] XGR_1.1.8 nnet_7.3-18 pals_1.7 [76] rlang_1.0.6 lifecycle_1.0.3 filelock_1.0.2 [79] httpcode_0.3.0 BiocFileCache_2.6.0 echotabix_0.99.8 [82] dichromat_2.0-0.1 cellranger_1.1.0 coloc_5.1.0.1 [85] matrixStats_0.63.0 graph_1.76.0 osfr_0.2.9 [88] boot_1.3-28.1 base64enc_0.1-3 png_0.1-8 [91] viridisLite_0.4.1 rjson_0.2.21 rootSolve_1.8.2.3 [94] bitops_1.0-7 R.oo_1.25.0 ggnetwork_0.5.10 [97] Biostrings_2.66.0 blob_1.2.3 mixsqp_0.3-48 [100] stringr_1.4.1 echoplot_0.99.6 dnet_1.1.7 [103] jpeg_0.1-9 echodata_0.99.16 BSgenome.Hsapiens.1000genomes.hs37d5_0.99.1 [106] scales_1.2.1 memoise_2.0.1 magrittr_2.0.3 [109] plyr_1.8.8 hexbin_1.28.2 zlibbioc_1.44.0 [112] compiler_4.2.0 echoconda_0.99.8 BiocIO_1.8.0 [115] RColorBrewer_1.1-3 catalogueR_1.0.0 EnsDb.Hsapiens.v75_2.99.0 [118] Rsamtools_2.14.0 cli_3.4.1 XVector_0.38.0 [121] echoannot_0.99.10 patchwork_1.1.2 htmlTable_2.4.1 [124] Formula_1.2-4 MASS_7.3-58.1 tidyselect_1.2.0 [127] stringi_1.7.8 textshaping_0.3.6 yaml_2.3.6 [130] supraHex_1.36.0 latticeExtra_0.6-30 ggrepel_0.9.2 [133] grid_4.2.0 VariantAnnotation_1.44.0 tools_4.2.0 [136] lmom_2.9 parallel_4.2.0 rstudioapi_0.14 [139] foreign_0.8-83 piggyback_0.1.4 gridExtra_2.3 [142] gld_2.6.6 farver_2.1.1 RcppZiggurat_0.1.6 [145] digest_0.6.30 BiocManager_1.30.19 Rcpp_1.0.9 [148] GenomicRanges_1.50.1 OrganismDbi_1.40.0 httr_1.4.4 [151] AnnotationDbi_1.60.0 RCircos_1.2.2 ggbio_1.46.0 [154] biovizBase_1.46.0 colorspace_2.0-3 XML_3.99-0.12 [157] fs_1.5.2 reticulate_1.26 splines_4.2.0 [160] RBGL_1.74.0 expm_0.999-6 echofinemap_0.99.4 [163] basilisk_1.10.2 Exact_3.2 mapproj_1.2.9 [166] SNPlocs.Hsapiens.dbSNP155.GRCh37_0.99.22 systemfonts_1.0.4 jsonlite_1.8.3 [169] Rfast_2.0.6 susieR_0.12.27 R6_2.5.1 [172] Hmisc_4.7-2 pillar_1.8.1 htmltools_0.5.3 [175] glue_1.6.2 fastmap_1.1.0 DT_0.26 [178] BiocParallel_1.32.3 class_7.3-20 codetools_0.2-18 [181] maps_3.4.1 mvtnorm_1.1-3 utf8_1.2.2 [184] lattice_0.20-45 tibble_3.1.8 curl_4.3.3 [187] DescTools_0.99.47 zip_2.2.2 openxlsx_4.2.5.1 [190] interp_1.1-3 googleAuthR_2.0.0 munsell_0.5.0 [193] e1071_1.7-12 GenomeInfoDbData_1.2.9 reshape2_1.4.4 [196] gtable_0.3.1 > ```
JonnyBaseball commented 1 year ago

BUG DESCRIPTION (SUPPLEMENT TO ISSUE)

I was also unable to install Polyfun module with your example data and here I responded 'y' to prompt to install:

REPRODUCIBLE EXAMPLE

topSNPs <- echodata::import_topSNPs(

results <- echolocatoR::finemap_loci(

  • fullSS_path = fullSS_path,
  • topSNPs = topSNPs,
  • loci = c("BST1"),
  • LD_reference = "1KGphase3",
  • dataset_name = "Nalls23andMe_2019",

  • fullSS_genome_build = "hg19",
  • bp_distance = 1000,
  • finemap_methods = c("ABF","SUSIE","FINEMAP","POLYFUN_FINEMAP","POLYFUN_SUSIE","PAINTOR","COJO_conditional","COJO_joint","COJO_stepwise"),
  • munged = TRUE)

CONSOLE OUTPUT

PolyFun is not installed. Reinstall echofinemap with PolyFun? This will automatically restart R. (y/n): y Installing PolyFun submodule. Cloning into '/var/folders/rl/6vqvm_h5319fml5s4vw8fbfr0000gn/T//RtmpNSorp8/file9c3057a3dc73'... fatal: unable to access 'https://github.com/RajLabMSSM/echofinemap/': Could not resolve host: github.com Error in package_file(): ! '/var/folders/rl/6vqvm_h5319fml5s4vw8fbfr0000gn/T//RtmpNSorp8/file9c3057a3dc73' is not a directory. Run rlang::last_error() to see where the error occurred.

rlang::last_error() <error/rlang_error> Error in package_file(): ! '/var/folders/rl/6vqvm_h5319fml5s4vw8fbfr0000gn/T//RtmpNSorp8/file9c3057a3dc73' is not a directory.

Backtrace:

  1. echolocatoR::finemap_loci(...)
  2. echofinemap::POLYFUN_install()
  3. echofinemap:::install_submodule_git("https://github.com/RajLabMSSM/echofinemap")
  4. devtools::install(install_dir, ...)
  5. devtools::as.package(pkg)
  6. devtools::package_file(path = x) Run rlang::last_trace() to see the full context.
BUG DESCRIPTION As well, I was unable to access PAINTOR

REPRODUCIBLE EXAMPLE

results <- echolocatoR::finemap_loci(

  • fullSS_path = fullSS_path,
  • topSNPs = topSNPs,
  • loci = c("BST1"),
  • LD_reference = "1KGphase3",
  • dataset_name = "Nalls23andMe_2019",

  • fullSS_genome_build = "hg19",
  • bp_distance = 1000,
  • finemap_methods = c("ABF","SUSIE","FINEMAP","PAINTOR","COJO_conditional","COJO_joint","COJO_stepwise"),
  • munged = TRUE)

CONSOLE OUTPUT

Error in PAINTOR_find_executable(paintor_path = paintor_path) : PAINTOR executable cannot be found.

SESSION INFO

utils::sessionInfo() R version 4.2.0 (2022-04-22) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Catalina 10.15.7

Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.2/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] stats4 stats graphics grDevices utils datasets methods base

other attached packages: [1] forestploter_0.2.3 snpStats_1.48.0 Matrix_1.5-3 survival_3.4-0 readr_2.1.3 GenomeInfoDb_1.34.3 IRanges_2.32.0
[8] S4Vectors_0.36.0 BiocGenerics_0.44.0 echolocatoR_2.0.3

loaded via a namespace (and not attached): [1] rappdirs_0.3.3 rtracklayer_1.58.0 GGally_2.1.2
[4] R.methodsS3_1.8.2 ragg_1.2.4 tidyr_1.2.1
[7] echoLD_0.99.8 ggplot2_3.4.0 bit64_4.0.5
[10] knitr_1.41 irlba_2.3.5.1 DelayedArray_0.24.0
[13] R.utils_2.12.2 data.table_1.14.6 rpart_4.1.19
[16] KEGGREST_1.38.0 RCurl_1.98-1.9 AnnotationFilter_1.22.0
[19] generics_0.1.3 GenomicFeatures_1.50.2 callr_3.7.3
[22] usethis_2.1.6 RSQLite_2.2.19 proxy_0.4-27
[25] bit_4.0.5 tzdb_0.3.0 httpuv_1.6.6
[28] xml2_1.3.3 SummarizedExperiment_1.28.0 assertthat_0.2.1
[31] viridis_0.6.2 gargle_1.2.1 xfun_0.35
[34] hms_1.1.2 promises_1.2.0.1 fansi_1.0.3
[37] restfulr_0.0.15 progress_1.2.2 dbplyr_2.2.1
[40] readxl_1.4.1 Rgraphviz_2.42.0 igraph_1.3.5
[43] DBI_1.1.3 htmlwidgets_1.5.4 reshape_0.8.9
[46] downloadR_0.99.5 purrr_0.3.5 ellipsis_0.3.2
[49] dplyr_1.0.10 ggnewscale_0.4.8 backports_1.4.1
[52] biomaRt_2.54.0 deldir_1.0-6 MatrixGenerics_1.10.0
[55] MungeSumstats_1.7.2 vctrs_0.5.1 Biobase_2.58.0
[58] remotes_2.4.2 ensembldb_2.22.0 cachem_1.0.6
[61] withr_2.5.0 BSgenome_1.66.1 checkmate_2.1.0
[64] vroom_1.6.0 GenomicAlignments_1.34.0 prettyunits_1.1.1
[67] cluster_2.1.4 ape_5.6-2 dir.expiry_1.6.0
[70] lazyeval_0.2.2 crayon_1.5.2 basilisk.utils_1.10.0
[73] crul_1.3 pkgconfig_2.0.3 labeling_0.4.2
[76] pkgload_1.3.2 nlme_3.1-160 ProtGenerics_1.30.0
[79] XGR_1.1.8 devtools_2.4.5 nnet_7.3-18
[82] pals_1.7 rlang_1.0.6 miniUI_0.1.1.1
[85] lifecycle_1.0.3 filelock_1.0.2 httpcode_0.3.0
[88] BiocFileCache_2.6.0 echotabix_0.99.8 dichromat_2.0-0.1
[91] cellranger_1.1.0 coloc_5.1.0.1 matrixStats_0.63.0
[94] graph_1.76.0 osfr_0.2.9 boot_1.3-28.1
[97] base64enc_0.1-3 processx_3.8.0 png_0.1-8
[100] viridisLite_0.4.1 rjson_0.2.21 rootSolve_1.8.2.3
[103] bitops_1.0-7 R.oo_1.25.0 ggnetwork_0.5.10
[106] Biostrings_2.66.0 blob_1.2.3 mixsqp_0.3-48
[109] stringr_1.4.1 echoplot_0.99.6 dnet_1.1.7
[112] jpeg_0.1-9 echodata_0.99.16 BSgenome.Hsapiens.1000genomes.hs37d5_0.99.1 [115] scales_1.2.1 memoise_2.0.1 magrittr_2.0.3
[118] plyr_1.8.8 hexbin_1.28.2 zlibbioc_1.44.0
[121] compiler_4.2.0 echoconda_0.99.8 BiocIO_1.8.0
[124] RColorBrewer_1.1-3 catalogueR_1.0.0 EnsDb.Hsapiens.v75_2.99.0
[127] Rsamtools_2.14.0 cli_3.4.1 urlchecker_1.0.1
[130] XVector_0.38.0 echoannot_0.99.10 ps_1.7.2
[133] patchwork_1.1.2 htmlTable_2.4.1 Formula_1.2-4
[136] MASS_7.3-58.1 tidyselect_1.2.0 stringi_1.7.8
[139] textshaping_0.3.6 yaml_2.3.6 supraHex_1.36.0
[142] latticeExtra_0.6-30 ggrepel_0.9.2 grid_4.2.0
[145] VariantAnnotation_1.44.0 tools_4.2.0 lmom_2.9
[148] parallel_4.2.0 rstudioapi_0.14 foreign_0.8-83
[151] piggyback_0.1.4 gridExtra_2.3 gld_2.6.6
[154] farver_2.1.1 RcppZiggurat_0.1.6 digest_0.6.30
[157] BiocManager_1.30.19 shiny_1.7.3 Rcpp_1.0.9
[160] GenomicRanges_1.50.1 later_1.3.0 OrganismDbi_1.40.0
[163] httr_1.4.4 AnnotationDbi_1.60.0 RCircos_1.2.2
[166] ggbio_1.46.0 biovizBase_1.46.0 colorspace_2.0-3
[169] XML_3.99-0.12 fs_1.5.2 reticulate_1.26
[172] splines_4.2.0 RBGL_1.74.0 expm_0.999-6
[175] echofinemap_0.99.4 basilisk_1.10.2 Exact_3.2
[178] mapproj_1.2.9 SNPlocs.Hsapiens.dbSNP155.GRCh37_0.99.22 sessioninfo_1.2.2
[181] systemfonts_1.0.4 xtable_1.8-4 jsonlite_1.8.3
[184] Rfast_2.0.6 susieR_0.12.27 R6_2.5.1
[187] profvis_0.3.7 Hmisc_4.7-2 mime_0.12
[190] pillar_1.8.1 htmltools_0.5.3 glue_1.6.2
[193] fastmap_1.1.0 DT_0.26 BiocParallel_1.32.3
[196] class_7.3-20 codetools_0.2-18 maps_3.4.1
[199] pkgbuild_1.4.0 mvtnorm_1.1-3 utf8_1.2.2
[202] lattice_0.20-45 tibble_3.1.8 curl_4.3.3
[205] DescTools_0.99.47 zip_2.2.2 openxlsx_4.2.5.1
[208] interp_1.1-3 googleAuthR_2.0.0 munsell_0.5.0
[211] e1071_1.7-12 GenomeInfoDbData_1.2.9 reshape2_1.4.4
[214] gtable_0.3.1
2022-12-06 12:40:35.793 R[39984:29884093] -deltaZ is deprecated for NSEventTypeMagnify. Please use -magnification.

JonnyBaseball commented 1 year ago

I tried again after reinstalling echolocatoR - with your example - got farther than before - but with final line:

Error in echofinemap::POLYFUN_install() : PolyFun is not installed. Resources/bin/R CMD INSTALL \

REPRODUCIBLE EXAMPLE

results <- echolocatoR::finemap_loci(

CONSOLE OUTPUT

PolyFun is not installed. Reinstall echofinemap with PolyFun? This will automatically restart R. (y/n): Y Installing PolyFun submodule. Cloning into '/var/folders/rl/6vqvm_h5319fml5s4vw8fbfr0000gn/T//Rtmp7yb4YZ/filef76f4b24f0c'... Submodule 'inst/tools/PAINTOR_V3.0' (https://github.com/gkichaev/PAINTOR_V3.0.git) registered for path 'inst/tools/PAINTOR_V3.0' Submodule 'inst/tools/polyfun' (https://github.com/omerwe/polyfun.git/) registered for path 'inst/tools/polyfun' Cloning into '/private/var/folders/rl/6vqvm_h5319fml5s4vw8fbfr0000gn/T/Rtmp7yb4YZ/filef76f4b24f0c/inst/tools/PAINTOR_V3.0'... Cloning into '/private/var/folders/rl/6vqvm_h5319fml5s4vw8fbfr0000gn/T/Rtmp7yb4YZ/filef76f4b24f0c/inst/tools/polyfun'... Submodule path 'inst/tools/PAINTOR_V3.0': checked out 'ffce82a7114eeb98220db39ba5d6b69e5a419a9e' Submodule path 'inst/tools/polyfun': checked out 'a9a2274906ef0737a48c909ba0c86d03272a4833' ── R CMD build ────────────────────────────────────────────────────────────────────────────────────────────────────────── ✔ checking for file ‘/private/var/folders/rl/6vqvm_h5319fml5s4vw8fbfr0000gn/T/Rtmp7yb4YZ/filef76f4b24f0c/DESCRIPTION’ ─ preparing ‘echofinemap’: (986ms)folders/rl/6vqvm_h5319fml5s4vw8fbfr0000gn/T/Rtmp7yb4YZ/filef76f4b24f0c/DESCRIPTION’ ─ checking for LF line-endings in source and make files and shell scripts (358ms) Running /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL \ /var/folders/rl/6vqvm_h5319fml5s4vw8fbfr0000gn/T//Rtmp7yb4YZ/echofinemap_0.99.4.tar.gz --install-tests