我要评分
获取效率
正确性
完整性
易理解

Compiling and Installing kmersGWAS

Procedure

When installing kmersGWAS on an x86 server, you can skip 2, 8, 9, and 10.

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following commands to add the sse2neon dependency:
    cd /path/to/KMERSGWAS
    wget https://github.com/DLTcollab/sse2neon/archive/master.tar.gz --no-check-certificate -O sse2neon-master.tar.gz
    tar -zxf sse2neon-master.tar.gz
    export CPLUS_INCLUDE_PATH=/path/to/KMERSGWAS/sse2neon-master/:$CPLUS_INCLUDE_PATH
    export C_INCLUDE_PATH=/path/to/KMERSGWAS/sse2neon-master/:$C_INCLUDE_PATH
  3. Run the following commands to decompress the installation package:
    cd /path/to/KMERSGWAS
    tar -zxf kmersGWAS-0.2-beta.tar.gz
  4. Run the following commands to copy the KMC package to kmersGWAS:
    tar -zxf KMC-3.1.2rc1.tar.gz
    cp -rf KMC-3.1.2rc1/* kmersGWAS-0.2-beta/include/KMC/
  5. Run the following commands to copy the CTPL package to kmersGWAS:
    tar -zxf CTPL-v.0.0.2.tar.gz
    cp -rf CTPL-v.0.0.2/* kmersGWAS-0.2-beta/include/CTPL/
  6. Run the following commands to copy the cxxopts package to kmersGWAS:
    tar -zxf cxxopts-2.2.1.tar.gz
    cp -rf cxxopts-2.2.1/* kmersGWAS-0.2-beta/include/cxxopts/
  7. Run the following command to go to the kmersGWAS installation directory:
    cd kmersGWAS-0.2-beta
  8. Run the following command to delete the -msse4.2 compilation option:
    sed -i 's/-msse4.2//g' Makefile
  9. Run the following command to add compilation optimization parameters:
    sed -i 's/-O3/-O3 -march=armv8.2-a -mtune=tsv110/g' Makefile
  10. Replace the nmmintrin.h reference file.
    • Run the following commands to comment out nmmintrin.h and smmintrin.h:
      sed -i 's/#include <nmmintrin.h>/\/\/#include <nmmintrin.h>/g;s/#include <smmintrin.h>/\/\/#include <smmintrin.h>/g' src/kmers_multiple_databases.cpp
      sed -i 's/#include <smmintrin.h>/\/\/#include <smmintrin.h>/g' src/snps_multiple_databases.cpp
    • Run the following commands to import the header file sse2neon.h:
      sed -i '/#include <nmmintrin.h>/ i\#include "sse2neon.h"' src/kmers_multiple_databases.cpp
      sed -i '/#include <smmintrin.h>/ i\#include "sse2neon.h"' src/snps_multiple_databases.cpp
  11. Run the following command to perform the compilation and installation:

    make -j

  12. Run the following commands to delete the original gemma_0_96 and create a new soft link:
    cd /path/to/KMERSGWAS/kmersGWAS-0.2-beta/external_programs
    rm -rf gemma_0_96
    ln -s /path/to/GEMMA/bin/gemma gemma_0_96