雜合度計算分為兩種:位點雜合度和樣本雜合度
1、計算位點雜合度,測試數據如下:
[root@centos79 test]# ls outcome.map outcome.ped [root@centos79 test]# cat outcome.map ## 8個snp位點 1 snp1 0 55910 1 snp2 0 85204 1 snp3 0 122948 1 snp4 0 203750 1 snp5 0 312707 1 snp6 0 356863 1 snp7 0 400518 1 snp8 0 487423 [root@centos79 test]# cat outcome.ped ## 8個樣本 DOR 1 0 0 0 -9 G G C C G G G G G A A A G G G C DOR 2 0 0 0 -9 G G G C G G G G G G A A A G C C DOR 3 0 0 0 -9 G G C C G G G G G G A A A G G C DOR 4 0 0 0 -9 G G C C G G G G G G A A G G G G DOR 5 0 0 0 -9 G G C C G G G G G G A A A G G C DOR 6 0 0 0 -9 G G C C G G G G G G A A A A C C DOR 7 0 0 0 -9 G G C C G G A G A A A A G G C C DOR 9 0 0 0 -9 G G C C G G A G A A A A G G C C
2、--hardy計算位點雜合度
[root@centos79 test]# plink --file outcome --hardy --out sitehet &> /dev/zero [root@centos79 test]# ls outcome.map outcome.ped sitehet.hwe sitehet.log sitehet.nosex ## 結果文件 [root@centos79 test]# cat sitehet.hwe CHR SNP TEST A1 A2 GENO O(HET) E(HET) P ## o(HET)為觀測雜合度百分率,利於第一個位點0,全部是G 1 snp1 ALL(NP) 0 G 0/0/8 0 0 1 1 snp2 ALL(NP) G C 0/1/7 0.125 0.1172 1 1 snp3 ALL(NP) 0 G 0/0/8 0 0 1 1 snp4 ALL(NP) A G 0/2/6 0.25 0.2188 1 1 snp5 ALL(NP) A G 2/1/5 0.125 0.4297 0.07692 1 snp6 ALL(NP) 0 A 0/0/8 0 0 1 1 snp7 ALL(NP) A G 1/3/4 0.375 0.4297 1 1 snp8 ALL(NP) G C 1/3/4 0.375 0.4297 1 [root@centos79 test]# cat outcome.ped DOR 1 0 0 0 -9 G G C C G G G G G A A A G G G C DOR 2 0 0 0 -9 G G G C G G G G G G A A A G C C DOR 3 0 0 0 -9 G G C C G G G G G G A A A G G C DOR 4 0 0 0 -9 G G C C G G G G G G A A G G G G DOR 5 0 0 0 -9 G G C C G G G G G G A A A G G C DOR 6 0 0 0 -9 G G C C G G G G G G A A A A C C DOR 7 0 0 0 -9 G G C C G G A G A A A A G G C C DOR 9 0 0 0 -9 G G C C G G A G A A A A G G C C
2、--het 計算樣本雜合度
首先要剔除沒有多態的位點:
[root@centos79 test]# ls outcome.map outcome.ped [root@centos79 test]# plink --file outcome --maf 0.0000001 --recode tab --out test &> /dev/null ## 利用plink的--maf參數剔除沒有多態的位點 [root@centos79 test]# ls outcome.map outcome.ped test.log test.map test.nosex test.ped [root@centos79 test]# cat test.ped ## 剩余5個位點 DOR 1 0 0 0 -9 C C G G A G G G G C DOR 2 0 0 0 -9 G C G G G G A G C C DOR 3 0 0 0 -9 C C G G G G A G G C DOR 4 0 0 0 -9 C C G G G G G G G G DOR 5 0 0 0 -9 C C G G G G A G G C DOR 6 0 0 0 -9 C C G G G G A A C C DOR 7 0 0 0 -9 C C A G A A G G C C DOR 9 0 0 0 -9 C C A G A A G G C C [root@centos79 test]# plink --file test --het --out indhet &> /dev/null ## 計算樣本雜合度 [root@centos79 test]# ls indhet.het indhet.log indhet.nosex outcome.map outcome.ped test.log test.map test.nosex test.ped [root@centos79 test]# cat indhet.het FID IID O(HOM) E(HOM) N(NM) F ## 0(HOM)為觀測的純合子數目,N是總的位點數雜合度為 (O-N)/N DOR 1 3 3.375 5 -0.2308 ## 比如第一個樣本三個純合子,那么雜合子5-3=2;雜合度 (5-3)/ 5 = 0.4 DOR 2 3 3.375 5 -0.2308 DOR 3 3 3.375 5 -0.2308 DOR 4 5 3.375 5 1 DOR 5 3 3.375 5 -0.2308 DOR 6 5 3.375 5 1 DOR 7 4 3.375 5 0.3846 DOR 9 4 3.375 5 0.3846