# LD

HIBLUP has the function of calculating LD correlation (r) for pairwise SNPs based on genotype allele counts. The commands are as follows:

./hiblup --ld
--bfile demo
--window-bp 1e6
--out demo_ldm
Then two files (*.info, *.bin) will be generated in the folder. Since the binary file (*.bin) cannot be opened directly, users can add a flag --write-txt in the above commands to output a readable “.txt” file. The command --window-bp is used to specify the size of non-overlapped window (default 1Mb), in which the number of SNPs is not fixed, users can replace it by --window-num to specify a fixed number of SNPs in a window, but the size of window is not constant in this case, or just use --window-geno to define all SNPs across entire genome as one window.