Notes re installing EPACTS on a Macintosh OS X 10.9.4 machine
To get EPACTS to install, there were a number of things I had to adjust.
Most of these appear to be minor to me.
I share these notes in case they might be helpful, but use at your own risk as I am not 100% certain my solutions don't have unintended side effects.
Dan Weeks
---------
Wouldn't compile due to errors like this:
pEmmax.cpp:2560:9: error: use of undeclared identifier 'isnanf'; did you mean 'isnan'?
if ( isnanf(emx.tvcf.genos[j + offset]) ) {
vcfast.cpp:209:13: error: use of undeclared identifier 'isnanf'; did you mean 'isnan'?
Looks like the Macintosh has isnan() but not isnanf()
Solution: Redefine isnanf as isnan in both pEmmax.cpp and vcfast.cpp
// Fix to get it to compile on a Macintosh
#define isnanf(X) isnan(X)
------
In file included from Anno.cpp:25:
./FreqTable.h:18:13: error: void function 'remove' should not return a value
[-Wreturn-type]
return false;
^ ~~~~~
It looks like the 'remove' function is not used.
Solution: To get it to compile, I changed the function from 'void' to 'int'
-------
$ test_run_epacts.sh
mkdir: illegal option -- -
usage: mkdir [-pv] [-m mode] directory ...
The offending line appears to be:
mkdir --p out/
"--p" should be "-p" instead on a Macintosh.
Solution: Change "--p" to "-p" in test_run_epacts.sh
Note: This was also a problem in the Makefile (see below).
----------
Loading required package: epactsR
Error: Cannot find epactsR package at /usr/local/lib/
In addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘epactsR’
Execution halted
Found the package in the 'data' subdirectory of the EPACTS distribution,
but it did not compile due to this:
epacts.cpp:287:7: error: use of undeclared identifier 'isnanf'; did you mean 'isnan'?
Solution: Redefine isnanf as isnan in epacts.cpp in the epactsR package:
// Fix to get it to compile on a Macintosh
#define isnanf(X) isnan(X)
--------
Installation also was incomplete because of the "--p" in the Makefile:
mkdir --p /usr/local/lib
mkdir: illegal option -- -
Solution: Change "--p" to "-p" in the Makefile
-------
Installation then died here:
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/lib/epactsR/libs/epactsR.so':
dlopen(/usr/local/lib/epactsR/libs/epactsR.so, 6): Library not loaded: libmysqlclient.18.dylib
Referenced from: /usr/local/lib/epactsR/libs/epactsR.so
Reason: image not found
Error: loading failed
Execution halted
ERROR: loading failed
Workaround: As
R CMD INSTALL epactsR
had worked just fine from the Terminal window, I just did a symbolic link from
/usr/local/lib to the installed epactsR package:
sudo ln -s /Library/Frameworks/R.framework/Versions/3.1/Resources/library/epactsR
and then EPACTS seems happier.
I then commented out the line in the Makefile that installs the epactsR library.
---------
EPACTS now gets through a lot more analyses, but then dies here:
Finished generating EPACTS Makefile
Running 5 parallel jobs of EPACTS
forkExecWait(): make -f /Users/dweeks/Temporary/out/test.gene.skat.Makefile -j 5
rm
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
make: *** [/Users/dweeks/Temporary/out/test.gene.skat.epacts.OK] Error 64
Error in running make -f /Users/dweeks/Temporary/out/test.gene.skat.Makefile -j 5. Exit code is 2
Looks like the Makefile has a line with just the command 'rm' on it:
$ cat /Users/dweeks/Temporary/out/test.gene.skat.Makefile
.DELETE_ON_ERROR:
all: /Users/dweeks/Temporary/out/test.gene.skat.epacts.OK
/Users/dweeks/Temporary/out/test.gene.skat.epacts.OK:
rm
touch /Users/dweeks/Temporary/out/test.gene.skat.epacts.OK
Does this trace back to this:
zcat: can't stat: out/1000G_exome_chr20_example_softFiltered.calls.sites.anno.vcf.gz (out/1000G_exome_chr20_example_softFiltered.calls.sites.anno.vcf.gz.Z): No such file or directory
and
zcat: can't stat: /Users/dweeks/Temporary/out/test.single.q.emmax.epacts.gz (/Users/dweeks/Temporary/out/test.single.q.emmax.epacts.gz.Z): No such file or directory
zcat on the Macintosh is looking for files that end in ".Z".
Under Linux, zcat is identical to gunzip -c, but not on the Macintosh
Solution: Replaced zcat with 'gunzip -c' whereever I could find it.
-------