Error,Dependencies

Hello,
When I try to install MelonnPan on R version 3.5 I got a problem which about
" ERROR: dependencies ‘glmnet’, ‘GenABEL’, ‘GenABEL.data’ are not available for package ‘melonnpan’

  • removing ‘/Users/chalaemkwan/Library/R/3.5/library/melonnpan’
    Error in i.p(…) : "
    Can anyone fix this problem for me, please?

The latest version of glmnet requires R version >=3.6.0—it is not available for R version 3.5. The bioBakery Vagrant image uses glmnet version 2.0-18, which can be installed with this command.

R -q -e "devtools::install_version('glmnet', version = '2.0-18', repos = 'http://cran.us.r-project.org')"

For GenABEL you should also be using the devtools:install_version command as mentioned here:

https://bitbucket.org/biobakery/biobakery/wiki/melonnpan#rst-header-installation

I’m using R 3.6.
I was able to install GenABEL (and GenABEL.data), but the installation of melonnpan is failing due to:

Error: (converted from warning) package 'glmnet' was built under R version 3.6.2
Execution halted

Any ideas how to fix this?

Many many thanks

I think there is not a version of GenABEL compatible with newer versions of R. Mine is R version 4.2.0.
Here is what I’ve tried and I don’t know what else to try.

I am using this command to try to install GenABEL
devtools::install_version(“GenABEL”, version = “1.8-0”, repos = “http://cran.us.r-project.org”)

I get a compilation fail error message and “Skipping 1 packages not available: GenABEL.data” even though GenABEL.data is installed and loads with no problems.
If I use-
install.packages(“GenABEL_1.8-0.tar.gz”, repos = NULL,type= “source”)
I get a similar error as before:
export_plink.cpp:116:39: warning: array subscript is of type ‘char’ [-Wchar-subscripts]
fileWoA << " " << Genotype[gtMatrix[i][csnp]];
^~~~~~~~~~~~~~~~~~
1 warning generated.
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c fexact.c -o fexact.o
fexact.c:1025:6: error: use of undeclared identifier ‘PROBLEM’
PROBLEM “Bug in FEXACT: gave negative key” RECOVER(NULL_ENTRY);
^
fexact.c:1806:5: error: use of undeclared identifier ‘PROBLEM’
PROBLEM “FEXACT error %d.\n%s”, icode, mes RECOVER(NULL_ENTRY);
^
2 errors generated.
make: *** [fexact.o] Error 1
ERROR: compilation failed for package ‘GenABEL’

  • removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/GenABEL’
    Warning in install.packages :
    installation of package ‘GenABEL_1.8-0.tar.gz’ had non-zero exit status

Hi all - I just pushed an update to circumvent the dependency issue. Would you please try installing the current version from GitHub? Let me know if you encounter any issues with the latest version.

Many thanks,
Himel

Hi. I was able to install it no problem today with devtools::install_github(“biobakery/melonnpan”)
So it seems like your update worked! Thanks :slight_smile:

I happen to have a similar error, I can’t install the package GenABEL in R:

fexact.c:1025:13: error: ‘PROBLEM’ undeclared (first use in this function)
1025 | PROBLEM “Bug in FEXACT: gave negative key” RECOVER(NULL_ENTRY);
| ^~~~~~~
fexact.c:1025:13: note: each undeclared identifier is reported only once for each function it appears in
fexact.c:1025:20: error: expected ‘;’ before string constant
1025 | PROBLEM “Bug in FEXACT: gave negative key” RECOVER(NULL_ENTRY);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ;
fexact.c: In function ‘prterr’:
fexact.c:1806:5: error: ‘PROBLEM’ undeclared (first use in this function)
1806 | PROBLEM “FEXACT error %d.\n%s”, icode, mes RECOVER(NULL_ENTRY);
| ^~~~~~~
fexact.c:1806:12: error: expected ‘;’ before string constant
1806 | PROBLEM “FEXACT error %d.\n%s”, icode, mes RECOVER(NULL_ENTRY);
| ^~~~~~~~~~~~~~~~~~~~~~~
| ;
make: *** [/usr/lib/R/etc/Makeconf:168: fexact.o] Error 1
ERROR: compilation failed for package ‘GenABEL’

  • removing ‘/home/studenti/R/x86_64-pc-linux-gnu-library/4.2/GenABEL’
    Warning message:
    In i.p(…) :
    installation of package ‘/tmp/RtmpNT5RVJ/file3997a00da01/GenABEL_1.8-0.tar.gz’ had non-zero exit status

I also tried to install from github as @pman successfully did, but I could not.

devtools::install_github(“biobakery/melonnpan”)

tells me:

Error in utils::download.file(url, path, method = method, quiet = quiet, :
cannot open URL ‘https://api.github.com/repos/biobakery/melonnpan/tarball/HEAD

I’ve also tried downloading tar.gz files and installing from local, without better results.