Table of Contents
fastGxE is a C++ command-line tool for genome-wide genotype-by-environment analysis. This page describes two installation paths:
- use the prebuilt Linux executable
- build
fastGxEfrom source with CMake
1. Prebuilt Linux executable #
A prebuilt 64-bit Linux executable is available here: fastGxE Linux Executable
After downloading it, make it executable and check that it runs:
chmod +x fastgxe
./fastgxe -h
This is the quickest option if you only need to run the program and your system is compatible with the published binary.
2. Build from source #
Building from source is recommended when you want to modify the code, change compiler settings, or adjust library paths for your local environment.
Prerequisites #
The current build system expects:
- a C++17 compiler
- CMake 3.16 or newer
- Intel oneAPI compiler and Intel MKL
- OpenMP support
The repository already vendors several dependencies under external/, including:
GSLEigenLBFGSppCLIspdlogBoost
Clone the repository #
git clone https://github.com/chaoning/fastGxE.git
cd fastGxE
Check and update build paths #
Before compiling, review CMakeLists.txt and update the local paths if needed. In particular, these variables often need to match your machine:
CMAKE_CXX_COMPILERCOMPILERROOTMKLROOTGSLROOTEIGENROOT
The current project configuration is written for an Intel oneAPI-based environment. If you build with a different compiler or install location, adjust the compiler and library paths first.
Configure and compile #
Create a separate build directory and compile with CMake:
mkdir -p build
cd build
cmake ..
cmake --build . -j
The main executable will be generated as:
./fastgxe
If you are in the repository root instead of the build/ directory, run:
./build/fastgxe -h
Static linking option #
The project currently enables full static linking by default through:
FASTGXE_FULL_STATIC_LINK=ON
To keep the default static-link behavior:
cmake .. -DFASTGXE_FULL_STATIC_LINK=ON
cmake --build . -j
If static linking is not available on your system, switch to dynamic linking:
cmake .. -DFASTGXE_FULL_STATIC_LINK=OFF
cmake --build . -j
You can inspect the resulting binary with:
file ./fastgxe
ldd ./fastgxe
3. Quick validation #
After compilation, confirm that the executable starts correctly:
./fastgxe -h
If you want a minimal end-to-end smoke test, the example files in example/ can be used together with the commands shown in the tutorial page.
4. Troubleshooting #
- If CMake cannot find MKL or the Intel compiler, recheck the path variables in
CMakeLists.txt. - If static linking fails, rebuild with
-DFASTGXE_FULL_STATIC_LINK=OFF. - If you changed compiler or dependency paths, it is usually safest to remove the old
build/directory and configure again from scratch. - If the executable starts but fails at runtime, verify that the compiler, MKL, and OpenMP settings are consistent with your local environment.