GrafAnc is a software tool that infers genetic ancestry at both continental and subcontinental levels quickly and reliably. GrafAnc source code includes C++ programs and Perl scripts. See GrafAnc documentation for software documentation.
Developer: Yumi (Jimmy) Jin, PhD.
The GrafAnc repository can be downloaded using the following command:
$ git clone https://github.com/jimmy-penn/grafanc.gitGrafAnc requires that htslib be installed on the system. Please refer to the htslib documentation for details.
GrafAnc also requires that file AncSnpPopAFs.txt be placed under the data directory. File AncSnpPopAFs.txt.gz needs to be unzipped:
$ cd grafanc/cpp
$ gunzip data/AncSnpPopAFs.txt.gzIf htslib is installed under directory ~/htslib/1.20/, GrafAnc can be built by running the following command under the root directory:
$ makeTo regenerate the C++ binary after editing the code, execute:
$ make clean
$ makeIf htslib is installed under a different directory, e.g., /applications/htslib/1.20/, GrafAnc can be built by executing:
$ make HTSLIB="/applications/htslib/1.20"Or alternatively, users can set HTSLIB in Makefile to the correct htslib directory and execute make.
In case the executable cannot be built from the source code, a prebuilt binary can be found under directory grafanc/bin/.
Test scripts and test cases are placed under medium_testing directory. Test cases are saved in test_manifest.txt. Perl script test_grafanc.pl is used for manually running these test cases.
- Make sure environment variable
PATHincludes current directory.. - If necessary, set environment variable
GARFPATHto include the directory where GrafAnc binary and Perl scripts are located. - Under
medium_testingdirectory, execute:test_grafanc.pl test_manifest.txt. - If source code is updated, update
test_manifest.txtto add new test cases or modify existing cases, and executetest_grafanc.pl test_manifest.txt 1to update the baseline. - Check the baseline files and make sure they are all correct, then execute
test_grafanc.pl test_manifest.txt(without the second parameter) again. - Make sure all test cases pass.