Setup Guide for Day 4

By Riza May Pasco

Note: This setup guide is designed for Linux systems, particularly Ubuntu. For Windows users, please use WSL2 or a Linux virtual machine.

  1. Install required software

    sudo apt update
    sudo apt install -y bcftools build-essential
  2. Install HDF5

    • Download the HDF5 source package here.
  3. Extract the Source Code

    • Extract the source from the hdf5-1.8.23.tar.gz file
      tar -xzvf hdf5-1.8.23.tar.gz
    • Navigate to the extracted directory
      cd hdf5-1.8.23
  4. Build and Install HDF5

    • Use the following commands to configure, build, and install HDF5

      ./configure
      make
      make install
  5. Compile Roven’s Program

    • Download Roven’s script here

    • Create a file named build.sh and add the following content:

          #!/bin/bash
      
          main=hdf5-1.8.23/src
          lib=/home/riza/Tools/hdf5-1.8.23/hdf5/lib  # Change this path to where HDF5 was installed
          include=$main
          PATH="$main/bin:$PATH"
          export LD_RUN_PATH=$lib
          export LDFLAGS="-L$lib"
          export CPPFLAGS="-I$include"
          header=$include
      
          g++ -o loadmatrix_geno -I $header loadmatrix_SNP-annot.cpp -lhdf5 -L$lib

      Important: Change the path assigned to the lib variable to match the directory where you installed the HDF5 library on your system

    • Make build.sh executable

      chmod u+x build.sh
    • Run the script

      ./build.sh
    • Verify. Run the compiled program:

      ./loadmatrix_geno
      • You should see the following:

         ./loadmatrix_geno
         -r  Number of rows in the input genotype matrix
         -m chunk dimension (height)
         -n chunk dimernsion (width)
         -t transposed orientation
         -o output-file
         ERROR: Cannot open file.