RajLabMSSM / echofinemap

echoverse module: Statistical and functional fine-mapping functions.
2 stars 1 forks source link

Error using gcta64 within echoR conda environment. -> gcta64: Exec format error #11

Closed AMCalejandro closed 2 years ago

AMCalejandro commented 2 years ago

The full error message happens when trying to execute gcta64 bin within the conda environment

+++ Multi-finemap:: COJO +++
[1] "+ COJO:: conditional analysis -- Conditioning on: rs4721411"
sh: 1: /home/acarrasco/.conda/envs/echoR/lib/R/library/echolocatoR/tools/gcta_1.92.1beta5_mac/bin/gcta64: Exec format error
[1] "+ COJO:: Processing results..."

I believe the way to download gcta64 assumes you are running COJO on a MAC by looking at the path to the exec. I am running echolocatoR on Linux and it fails when trying to use the COJO from gcta64

I am not sure where I can finf this bug reallyu. It is easy to solve locally ( Just copying the gcta64 bin for Linux within .bin/ conda env but maybe nice to automate it on echolocatoR. As if, specifying the OS where echolocatoR is used

bschilder commented 2 years ago

Thanks for bringing this up, I now have some better ways of handling CLI dependencies which should make echolocatoR more portable across platforms. Basically, I download the executable for that particular OS, and then cache it here:

tools::R_user_dir(package = "<pkg>", which = "cache")

This is the strategy I've taken with echofinemap's FINEMAP executables, which seems to work pretty well now, and plan to do the same with COJO soon. WIll keep you posted!

I'll let you know if I think of any quick workarounds in the meantime.

bschilder commented 2 years ago

I believe this should now be resolved using the strategy mentioned here: #5