跳至正文

HIBLUP can calculate allele frequency and genotype frequency for markers.

Allele frequency

If the flag

--allele-freq
--allele-freq is detected in the input command, HIBLUP will calculate A1 allele frequency for all SNPs in genotype:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
./hiblup --bfile demo --allele-freq --out demo
./hiblup --bfile demo --allele-freq --out demo
./hiblup --bfile demo --allele-freq --out demo

It will generate a file named “

demo.afreq
demo.afreq“, brief view of this file:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
SNP a1 a2 freq_a1
snp1 A C 0.2775
snp2 G T 0.4475
snp3 A G 0.1918
SNP a1 a2 freq_a1 snp1 A C 0.2775 snp2 G T 0.4475 snp3 A G 0.1918
SNP     a1  a2  freq_a1
snp1    A   C   0.2775
snp2    G   T   0.4475
snp3    A   G   0.1918

Then users can filter SNPs with a specific condition, for example, pick up SNPs at the condition of 0.05 < freq <= 0.1:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
awk '$4 > 0.05 && $4 <= 0.1 {print $1}' demo.afreq > freq_filter_snp.txt
awk '$4 > 0.05 && $4 <= 0.1 {print $1}' demo.afreq > freq_filter_snp.txt
awk '$4 > 0.05 && $4 <= 0.1 {print $1}' demo.afreq > freq_filter_snp.txt

HIBLUP can also supports to compute allele frequency for sub-groups, supposing that there are mixed groups in binary genotype file, we are interested in the distribution or comparing the difference of allele frequency among groups, it is easy to implement by specifying a population classification file (see file format here) to the option “

--pop-class
--pop-class” when running HIBLUP, for example:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
./hiblup --bfile demo --allele-freq --pop-class demo.popclass.txt --out demo
./hiblup --bfile demo --allele-freq --pop-class demo.popclass.txt --out demo
./hiblup --bfile demo --allele-freq --pop-class demo.popclass.txt --out demo

Then the allele frequency of different groups will be listed by columns:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
SNP a1 a2 DD_freq_a1 YY_freq_a1 LL_freq_a1
snp1 A C 0.2353 0.1245 0.5423
snp2 G T 0.1235 0.3456 0.2356
snp3 A G 0.0235 0.1224 0.2123
SNP a1 a2 DD_freq_a1 YY_freq_a1 LL_freq_a1 snp1 A C 0.2353 0.1245 0.5423 snp2 G T 0.1235 0.3456 0.2356 snp3 A G 0.0235 0.1224 0.2123
SNP     a1  a2  DD_freq_a1  YY_freq_a1  LL_freq_a1
snp1    A   C   0.2353      0.1245      0.5423
snp2    G   T   0.1235      0.3456      0.2356
snp3    A   G   0.0235      0.1224      0.2123

Genotype frequency

If the flag

--geno-freq
--geno-freq is detected in the input command, HIBLUP will calculate the genotype frequency of A1A1 and A2A2 for all SNPs in genotype:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
./hiblup --bfile demo --geno-freq --out demo
./hiblup --bfile demo --geno-freq --out demo
./hiblup --bfile demo --geno-freq --out demo

It will generate a file named

demo.gfreq
demo.gfreq, brief view of this file:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
SNP a1 a2 freq_a1a1 freq_a2a2
snp1 A C 0.3456 0.1244
snp2 G T 0.2358 0.2345
snp3 A G 0.1395 0.4643
SNP a1 a2 freq_a1a1 freq_a2a2 snp1 A C 0.3456 0.1244 snp2 G T 0.2358 0.2345 snp3 A G 0.1395 0.4643
SNP     a1  a2  freq_a1a1  freq_a2a2
snp1    A   C    0.3456     0.1244
snp2    G   T    0.2358     0.2345
snp3    A   G    0.1395     0.4643

As described above, HIBLUP also supports to compute genotype frequency for sub-groups, just specify a population classification file to option “

--pop-class
--pop-class” when running “
--geno-freq
--geno-freq“.