weizhouUMICH / SAIGE

GNU Lesser General Public License v3.0
188 stars 73 forks source link

installation issues: ERROR: configuration failed for package ‘SAIGE’ #347

Closed complexgenome closed 3 years ago

complexgenome commented 3 years ago

Hello @weizhouUMICH

I am interested to use SAIGE-gene.

I try to install saige using two methods: conda and devtools. With both approaches I get errors related to installation of SKAT.

Step 1

wget "https://raw.githubusercontent.com/weizhouUMICH/SAIGE/master/conda_env/environment-RSAIGE.yml"

conda env create -f environment-RSAIGE.yml

FLAGPATH=`which python | sed 's|/bin/python$||'`
export LDFLAGS="-L${FLAGPATH}/lib"
export CPPFLAGS="-I${FLAGPATH}/include"

--- Go to R env 

$R  

 $devtools::install_github("leeshawn/MetaSKAT")

Downloading GitHub repo leeshawn/MetaSKAT@master
sh: 1: /bin/gtar: not found
sh: 1: /bin/gtar: not found
Error: Failed to install 'MetaSKAT' from GitHub:
  error in running command
In addition: Warning messages:
1: In system(cmd) : error in running command
2: In utils::untar(tarfile, ...) :
  ‘/bin/gtar -xf '/tmp/RtmpP9qmGi/file1f12f533fb4.tar.gz' -C '/tmp/RtmpP9qmGi/remotes1f124995817a'’ returned error code 127

MetaSKAT has been archived from CRAN https://cran.r-project.org/web/packages/MetaSKAT/index.html

Step two: I already had R conda environment v4.0


conda activate Condainhouse_R-4.0

R
$.libPaths(c("/home/ss5505/libraries_R/CONDAR_inhouse4.0",.libPaths()))

conda activate Condainhouse_R-4.0

$R 

.libPaths()
.libPaths(c("/home/ss5505/libraries_R/CONDAR_inhouse4.0",.libPaths()))

Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS=TRUE) ## https://github.com/r-lib/remotes/issues/434#issuecomment-721450164

devtools::install_github("leeshawn/MetaSKAT")
devtools::install_github("weizhouUMICH/SAIGE")

Please see below log for installation error:

Installing package into ‘/mnt/mfs/hgrcgrid/homes/ss5505/libraries_R/CONDAR_inhouse4.0’ (as ‘lib’ is unspecified)

  • installing source package ‘SAIGE’ ... ** using staged installation cget must be installed to build SAIGE. Run Collecting cget Downloading cget-0.1.9.tar.gz (25 kB) Collecting click>=6.6 Downloading click-8.0.0-py3-none-any.whl (96 kB) Requirement already satisfied: six>=1.10 in /mnt/mfs/hgrcgrid/homes/ss5505/conda/my-envs/Condainhouse_R-4.0/lib/python3.9/site-packages (from cget) (1.15.0) Building wheels for collected packages: cget Building wheel for cget (setup.py): started Building wheel for cget (setup.py): finished with status 'done' Created wheel for cget: filename=cget-0.1.9-py3-none-any.whl size=28370 sha256=6ceafb7541f2c134dd8477d997ae74f732a637742c54f199d949aa7f568521b0 Stored in directory: /mnt/mfs/hgrcgrid/homes/ss5505/.cache/pip/wheels/42/77/40/44572c07a9e7f186be46f4fd907785fd476a077ecaa98c8a78 Successfully built cget Installing collected packages: click, cget Successfully installed cget-0.1.9 click-8.0.0. ERROR: configuration failed for package ‘SAIGE’
  • removing ‘/mnt/mfs/hgrcgrid/homes/ss5505/libraries_R/CONDAR_inhouse4.0/SAIGE’ Warning message: In i.p(...) : installation of package ‘/tmp/RtmpKUBFgS/file25462082bb0f/SAIGE_0.44.5.tar.gz’ had non-zero exit status

I was able to install MetaSKAT by bypassing errors with Sys.setenv

However, I cannot still install Saige on R4.0

Best,

complexgenome commented 3 years ago

Further updates:

I exited conda environment, again logged in. As I got error for cget I ran following commands

 conda install -n root -c conda-forge cget
 conda install -c conda-forge zlib

conda activate Condainhouse_R-4.0

R


.libPaths()
.libPaths(c("/home/ss5505/libraries_R/CONDAR_inhouse4.0",.libPaths()))

 Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS=TRUE) ## https://github.com/r-lib/remotes/issues/434#issuecomment-721450164

devtools::install_github("weizhouUMICH/SAIGE")

These also didn't work as errors persist.

I found issue: https://github.com/weizhouUMICH/SAIGE/issues/272 Followed steps and it worked fine:

conda config --add channels bioconda
conda config --add channels conda-forge

conda create -n saige -c bioconda r-saige=0.44.5
conda activate saige

step1_fitNULLGLMM.R --help
step2_SPAtests.R --help
createSparseGRM.R --help

All works fine now.

jingydz commented 1 year ago

Command

conda config --add channels bioconda conda config --add channels conda-forge

conda create -n saige -c bioconda r-saige=0.44.5 conda activate saige

Logfile

SAIGE]$ conda create -n saige -c bioconda r-saige=0.44.5 Collecting package metadata (current_repodata.json): failed

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
  File "/Parastor300s_G30S/zhangjj/software/miniconda3/lib/python3.9/site-packages/conda/core/subdir_data.py", line 704, in fetch_repodata_remote_request
    resp.raise_for_status()
  File "/Parastor300s_G30S/zhangjj/software/miniconda3/lib/python3.9/site-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch/current_repodata.json

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Parastor300s_G30S/zhangjj/software/miniconda3/lib/python3.9/site-packages/requests/models.py", line 910, in json
    return complexjson.loads(self.text, **kwargs)
  File "/Parastor300s_G30S/zhangjj/software/miniconda3/lib/python3.9/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/Parastor300s_G30S/zhangjj/software/miniconda3/lib/python3.9/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/Parastor300s_G30S/zhangjj/software/miniconda3/lib/python3.9/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Parastor300s_G30S/zhangjj/software/miniconda3/lib/python3.9/site-packages/conda/exceptions.py", line 1114, in __call__
    return func(*args, **kwargs)

... $ /Parastor300s_G30S/zhangjj/software/miniconda3/bin/conda create -n saige -c bioconda r-saige=0.44.5 An unexpected error has occurred. Conda has prepared the above report.

If submitted, this report will be used by core maintainers to improve future releases of conda. Would you like conda to send this report to the core maintainers?

Upload successful.