RajLabMSSM / echolocatoR

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

Installation - An update #102

Closed AMCalejandro closed 1 year ago

AMCalejandro commented 1 year ago

Hi, I thought the issue with installing the echoverse could be, at least partly, due to my local environment

I tried to install echoverse within MAGMA docker container. This did not improve #100

image

bschilder commented 1 year ago

Can't tell what's going on without the full installation messages, but I'm going to guess that this may have something to do with your GitHub token (see 2nd bullet point): https://github.com/RajLabMSSM/echolocatoR#echolocator-v10-vsv20

bschilder commented 1 year ago

Ok, so I just was able to replicate something similar within my Docker container.

The reason this was happening, I think, is because of the order in which packages were being updated. In my case, when the new echofinemap was being installed, it couldn't find a new function echoconda::find_executables_remote. But that's because it hadn't updated echoconda yet.

Coordinating >10 packages does make a bit tricky, but I'll keep on the lookout for these kinds of conflicts. In the meantime, a simple fix is to rerun the install command several times, until all packages are updated and echolocatoR can be fully installed. These flags might help speed up the process as well:

remotes::install_github("RajLabMSSM/echolocatoR",dependencies = TRUE, upgrade = TRUE)
AMCalejandro commented 1 year ago

Yes, so I have been using the GitHub token.

In the magma docker container, I tried to do what you just said.

It gets better, although there is a confflict with susie version apparently. Even though I am passing upgrade = True

Output after nth run of remote::install_github in the magma container

> remotes::install_github("RajLabMSSM/echolocatoR",dependencies = TRUE, upgrade = TRUE)
Using github PAT from envvar GITHUB_TOKEN
Downloading GitHub repo RajLabMSSM/echolocatoR@HEAD
echofinemap (NA -> 02860f275...) [GitHub]
Downloading GitHub repo RajLabMSSM/echofinemap@HEAD

Skipping 2 packages ahead of CRAN: rlang, R.utils
✔  checking for file ‘/tmp/RtmpnuzMGT/remotes12c7819f97f/RajLabMSSM-echofinemap-02860f2/DESCRIPTION’ ...
─  preparing ‘echofinemap’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Removed empty directory ‘echofinemap/inst/tools/PAINTOR_V3.0’
   Removed empty directory ‘echofinemap/inst/tools/polyfun’
   Removed empty directory ‘echofinemap/inst/tools’
   Omitted ‘LazyData’ from DESCRIPTION
─  building ‘echofinemap_0.99.3.tar.gz’

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘echofinemap’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace ‘susieR’ 0.11.92 is already loaded, but >= 0.12.0 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘echofinemap’
* removing ‘/usr/local/lib/R/site-library/echofinemap’
Skipping 30 packages ahead of CRAN: rlang, yulab.utils, DelayedArray, Biobase, MatrixGenerics, Rhtslib, BiocParallel, SummarizedExperiment, BiocIO, GenomicAlignments, Rsamtools, zlibbioc, Biostrings, GenomeInfoDb, XVector, IRanges, S4Vectors, BiocGenerics, GenomicRanges, dbplyr, BiocFileCache, biomaRt, KEGGREST, GenomicFeatures, BSgenome, rtracklayer, AnnotationDbi, pkgload, VariantAnnotation, R.utils
Downloading GitHub repo RajLabMSSM/echofinemap@HEAD
Skipping echofinemap, it is already being installed
✔  checking for file ‘/tmp/RtmpnuzMGT/remotes12c11888a2/RajLabMSSM-echolocatoR-5585f1a/DESCRIPTION’ (351ms)
─  preparing ‘echolocatoR’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Omitted ‘LazyData’ from DESCRIPTION
─  building ‘echolocatoR_2.0.0.tar.gz’

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
ERROR: dependency ‘echofinemap’ is not available for package ‘echolocatoR’
* removing ‘/usr/local/lib/R/site-library/echolocatoR’
Warning messages:
1: In i.p(...) :
  installation of package ‘/tmp/RtmpnuzMGT/file12c268ea2e/echofinemap_0.99.3.tar.gz’ had non-zero exit status
2: In i.p(...) :
  installation of package ‘/tmp/RtmpnuzMGT/file12c64ec94c7/echolocatoR_2.0.0.tar.gz’ had non-zero exit status
bschilder commented 1 year ago
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace ‘susieR’ 0.11.92 is already loaded, but >= 0.12.0 is required

I've seen similar error messages when a package needs to be updated but is already loaded in the namespace. Restarting your R session usually resolves this.

AMCalejandro commented 1 year ago

Apparently the latest version of susieR from CRAN is 0.12.19, but 0.11.92 gets installed by default Maybe change susieR installation strategy, to install the latest development verions

Suggestion

remotes::install_github("stephenslab/susieR")

This made the trick for me

> remotes::install_github("stephenslab/susieR")
Using github PAT from envvar GITHUB_TOKEN
Downloading GitHub repo stephenslab/susieR@HEAD
Skipping 1 packages ahead of CRAN: rlang
✔  checking for file ‘/tmp/RtmpnuzMGT/remotes12c265aad05/stephenslab-susieR-dcd0d09/DESCRIPTION’ ...
─  preparing ‘susieR’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘susieR_0.12.19.tar.gz’

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘susieR’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (susieR)
> remotes::install_github("RajLabMSSM/echolocatoR",dependencies = TRUE, upgrade = TRUE)
Using github PAT from envvar GITHUB_TOKEN
Downloading GitHub repo RajLabMSSM/echolocatoR@HEAD
echoconda   (3ad37740e... -> 5fa8c0e3f...) [GitHub]
echofinemap (NA           -> 02860f275...) [GitHub]
Downloading GitHub repo RajLabMSSM/echofinemap@HEAD
echoconda (3ad37740e... -> 5fa8c0e3f...) [GitHub]
Skipping 2 packages ahead of CRAN: rlang, R.utils
Downloading GitHub repo RajLabMSSM/echoconda@HEAD

Skipping 2 packages ahead of CRAN: rlang, R.utils
✔  checking for file ‘/tmp/RtmpnuzMGT/remotes12c2a99d38f/RajLabMSSM-echoconda-5fa8c0e/DESCRIPTION’ ...
─  preparing ‘echoconda’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Omitted ‘LazyData’ from DESCRIPTION
─  building ‘echoconda_0.99.7.tar.gz’

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘echoconda’ ...
** using non-staged installation via StagedInstall field
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (echoconda)
✔  checking for file ‘/tmp/RtmpnuzMGT/remotes12c259980d0/RajLabMSSM-echofinemap-02860f2/DESCRIPTION’ ...
─  preparing ‘echofinemap’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Removed empty directory ‘echofinemap/inst/tools/PAINTOR_V3.0’
   Removed empty directory ‘echofinemap/inst/tools/polyfun’
   Removed empty directory ‘echofinemap/inst/tools’
   Omitted ‘LazyData’ from DESCRIPTION
─  building ‘echofinemap_0.99.3.tar.gz’

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘echofinemap’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (echofinemap)
Skipping 30 packages ahead of CRAN: rlang, yulab.utils, DelayedArray, Biobase, MatrixGenerics, Rhtslib, BiocParallel, SummarizedExperiment, BiocIO, GenomicAlignments, Rsamtools, zlibbioc, Biostrings, GenomeInfoDb, XVector, IRanges, S4Vectors, BiocGenerics, GenomicRanges, dbplyr, BiocFileCache, biomaRt, KEGGREST, GenomicFeatures, BSgenome, rtracklayer, AnnotationDbi, pkgload, VariantAnnotation, R.utils
Skipping install of 'echoconda' from a github remote, the SHA1 (5fa8c0e3) has not changed since last install.
  Use `force = TRUE` to force installation
Skipping install of 'echofinemap' from a github remote, the SHA1 (02860f27) has not changed since last install.
  Use `force = TRUE` to force installation
✔  checking for file ‘/tmp/RtmpnuzMGT/remotes12c10f4cd73/RajLabMSSM-echolocatoR-5585f1a/DESCRIPTION’ ...
─  preparing ‘echolocatoR’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Omitted ‘LazyData’ from DESCRIPTION
─  building ‘echolocatoR_2.0.0.tar.gz’

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘echolocatoR’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
⠊⠉⠡⣀⣀⠊⠉⠡⣀⣀⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠                                    
⠌⢁⡐⠉⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠉⢂⡈⠑⣀⠉⢄⡈⠡⣀                                    
⠌⡈⡐⢂⢁⠒⡈⡐⢂⢁⠒⡈⡐⢂⢁⠑⡈⡈⢄⢁⠡⠌⡈⠤⢁⠡⠌⡈⠤⢁⠡⠌⡈⡠⢁⢁⠊⡈⡐⢂                                    

── 🦇  🦇  🦇 e c h o l o c a t o R 🦇  🦇  🦇 ─────────────────────────────────

── v2.0.0 ──────────────────────────────────────────────────────────────────────
⠌⡈⡐⢂⢁⠒⡈⡐⢂⢁⠒⡈⡐⢂⢁⠑⡈⡈⢄⢁⠡⠌⡈⠤⢁⠡⠌⡈⠤⢁⠡⠌⡈⡠⢁⢁⠊⡈⡐⢂                                    
⠌⢁⡐⠉⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠉⢂⡈⠑⣀⠉⢄⡈⠡⣀                                    
⠊⠉⠡⣀⣀⠊⠉⠡⣀⣀⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠                                    
ⓞ If you use echolocatoR, please cite:                                          
     ▶ Brian M Schilder, Jack Humphrey, Towfique                                
     Raj (2021) echolocatoR: an automated                                       
     end-to-end statistical and functional                                      
     genomic fine-mapping pipeline,                                             
     Bioinformatics; btab658,                                                   
     https://doi.org/10.1093/bioinformatics/btab658                             
ⓞ Please report any bugs/feature requests on GitHub:
     ▶
     https://github.com/RajLabMSSM/echolocatoR/issues
ⓞ Contributions are welcome!:
     ▶
     https://github.com/RajLabMSSM/echolocatoR/pulls

────────────────────────────────────────────────────────────────────────────────
** testing if installed package can be loaded from final location
⠊⠉⠡⣀⣀⠊⠉⠡⣀⣀⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠                                    
⠌⢁⡐⠉⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠉⢂⡈⠑⣀⠉⢄⡈⠡⣀                                    
⠌⡈⡐⢂⢁⠒⡈⡐⢂⢁⠒⡈⡐⢂⢁⠑⡈⡈⢄⢁⠡⠌⡈⠤⢁⠡⠌⡈⠤⢁⠡⠌⡈⡠⢁⢁⠊⡈⡐⢂                                    

── 🦇  🦇  🦇 e c h o l o c a t o R 🦇  🦇  🦇 ─────────────────────────────────

── v2.0.0 ──────────────────────────────────────────────────────────────────────
⠌⡈⡐⢂⢁⠒⡈⡐⢂⢁⠒⡈⡐⢂⢁⠑⡈⡈⢄⢁⠡⠌⡈⠤⢁⠡⠌⡈⠤⢁⠡⠌⡈⡠⢁⢁⠊⡈⡐⢂                                    
⠌⢁⡐⠉⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠊⢂⡐⠑⣀⠉⢂⡈⠑⣀⠉⢄⡈⠡⣀                                    
⠊⠉⠡⣀⣀⠊⠉⠡⣀⣀⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠⠊⠉⠢⣀⡠                                    
ⓞ If you use echolocatoR, please cite:                                          
     ▶ Brian M Schilder, Jack Humphrey, Towfique                                
     Raj (2021) echolocatoR: an automated                                       
     end-to-end statistical and functional                                      
     genomic fine-mapping pipeline,                                             
     Bioinformatics; btab658,                                                   
     https://doi.org/10.1093/bioinformatics/btab658                             
ⓞ Please report any bugs/feature requests on GitHub:
     ▶
     https://github.com/RajLabMSSM/echolocatoR/issues
ⓞ Contributions are welcome!:
     ▶
     https://github.com/RajLabMSSM/echolocatoR/pulls

────────────────────────────────────────────────────────────────────────────────
** testing if installed package keeps a record of temporary installation path
* DONE (echolocatoR)
* 
bschilder commented 1 year ago

Ah, I see. I added the version restriction bc of this. https://github.com/stephenslab/susieR/issues/169

The latest version on CRAN does indeed seem to be the required v0.12.19, so that should be ok. https://cran.r-project.org/web/packages/susieR/index.html

☝️ Just confirmed the latest CRAN version does indeed install on both my Mac and Linux Docker container.

I think therefore this may be another issue with coordinating updates. If an older version of susieR was already loaded into the namespace when you tried to rerun echolocatoR. So restarting the R session whenever you run into installation issues (with any package), is generally a good idea.