Note: This setup guide is designed for Linux systems, particularly Ubuntu. For Windows users, please use WSL2 or a Linux virtual machine.
Install required software
sudo apt update sudo apt install -y bcftools build-essentialInstall HDF5
- Download the HDF5 source package here.
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
- Extract the source from the hdf5-1.8.23.tar.gz file
Build and Install HDF5
Use the following commands to configure, build, and install HDF5
./configuremakemake install
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$libImportant: 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.shRun the script
./build.shVerify. Run the compiled program:
./loadmatrix_genoYou 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.