Compilation and Installation
ApproxWF is only distributed as source code, but it will be easy for you to compile and run the program on all Unix systems and with not that much additional work also on Windows. Here we will show you how.
Step 1: Obtaining the source code
ApproxWF is hosted on bitbucket and can be cloned with the command:
git clone --depth 1 https://WegmannLab@bitbucket.org/WegmannLab/approxwf.git
Alternative, the source can also be downloaded as a zipped folder. This folder contains the latest C++ source code of ApproxWF as well as the sub folder "examples" containing some example files. (See [downloads page](https://bitbucket.org/wegmannlab/approxwf/downloads) for more options).
Step 2: Compiling the code
After unzipping or cloning, the code must be compiled to obtain an executable. It is recommended to use the GNU C++ compiler g++, which is part of the GCC package and is pre-installed on any Linux system. On a Mac, g++ can be installed as part of the developer tools. On windows, it is advised to use the g++ compiler that ships with cygwin.
To compile ApproxWF, simply type the following command in the base folder:
g++ -std=c++11 -O3 -o ApproxWF *.cpp -fopenmp -lz
That's it! ApproxWF is now ready to use. Given it has been compiled with the -fopenmp option, ApproxWF can now run on multiple cores. Using multiple cores is convenient to speed up the calculation, especially when the number of loci is large.
Should you not have openMP installed, you may compile ApproxWF for single core use as follows:
g++ -std=c++11 -O3 -o ApproxWF *.cpp -lz
Step 3: Launching ApproxWF
To launch ApproxWF from within the source base folder, type:
If you want to call ApproxWF from a different folder, you must specify the absolute path to it. It can thus be convenient to copy the executable somewhere else or to add the source folder to your $PATH variable (search on Google for more advice).