其他分享
首页 > 其他分享> > 使用plink、gemma软件进行gwas分析增加协变量

使用plink、gemma软件进行gwas分析增加协变量

作者:互联网

 

001、plink

root@DESKTOP-1N42TVH:/home/test# ls
cov.txt  gwas_test.map  gwas_test.ped
root@DESKTOP-1N42TVH:/home/test# head cov.txt  ## 协变量文件前两列FID、IID; 第三列性别、第四列到最后PC1-PC5
fam1    id1     2       -0.0102664      0.0442708       -0.0658835      0.0251031       0.0126605
fam2    id2     1       0.0421124       -0.0313769      -0.0705913      -0.00235322     0.0344052
fam3    id3     2       -0.0467758      -0.00993805     -0.000487215    0.000353833     0.00282548
fam4    id4     1       -0.00308783     0.0120855       -0.00974726     -0.020038       -0.0383983
fam5    id5     2       -0.0343457      0.00118044      -0.0188934      -0.0217425      -0.0184055
fam6    id6     1       0.00950329      0.0292526       -0.00076269     -0.00176404     -0.0310272
fam7    id7     1       -0.0378972      0.0198437       0.048737        0.112635        0.0563696
fam8    id8     1       -0.031701       0.00046604      -0.00252424     0.0036959       -0.00241191
fam9    id9     1       0.0178986       0.00661469      0.0663559       -0.0156097      -0.012672
fam10   id10    1       -0.0461441      0.0144468       0.0127385       -0.00764761     -0.0210643
root@DESKTOP-1N42TVH:/home/test# plink --file gwas_test --covar cov.txt --covar-number 1-6 --linear --out result
root@DESKTOP-1N42TVH:/home/test# ls             ## --covar-number 1-6 指的是性别和前五个主成分(自动跳过FID和IID)
cov.txt  gwas_test.map  gwas_test.ped  result.assoc.linear  result.log
root@DESKTOP-1N42TVH:/home/test# head result.assoc.linear
 CHR        SNP         BP   A1       TEST    NMISS       BETA         STAT            P
   1       snp1       2802    G        ADD      541     -1.083      -0.1411       0.8878
   1       snp1       2802    G       COV1      541     -34.49       -5.496    6.021e-08
   1       snp1       2802    G       COV2      541      653.1        8.933    6.714e-18
   1       snp1       2802    G       COV3      541      213.2        2.929     0.003547
   1       snp1       2802    G       COV4      541      114.5        1.576       0.1156
   1       snp1       2802    G       COV5      541      13.96       0.1918        0.848
   1       snp1       2802    G       COV6      541      69.38       0.9562       0.3394
   1       snp2       2823    T        ADD      541      9.535        1.038       0.2997
   1       snp2       2823    T       COV1      541     -34.75       -5.543    4.674e-08

 

002、gemma

root@DESKTOP-1N42TVH:/home/test# ls
cov.txt  gwas_test.bed  gwas_test.bim  gwas_test.fam
root@DESKTOP-1N42TVH:/home/test# head cov.txt    ## 协变量文件, 第一列为1; 第二列为性别; 第三至最后一列为PCA
1       2       -0.0102664      0.0442708       -0.0658835      0.0251031       0.0126605
1       1       0.0421124       -0.0313769      -0.0705913      -0.00235322     0.0344052
1       2       -0.0467758      -0.00993805     -0.000487215    0.000353833     0.00282548
1       1       -0.00308783     0.0120855       -0.00974726     -0.020038       -0.0383983
1       2       -0.0343457      0.00118044      -0.0188934      -0.0217425      -0.0184055
1       1       0.00950329      0.0292526       -0.00076269     -0.00176404     -0.0310272
1       1       -0.0378972      0.0198437       0.048737        0.112635        0.0563696
1       1       -0.031701       0.00046604      -0.00252424     0.0036959       -0.00241191
1       1       0.0178986       0.00661469      0.0663559       -0.0156097      -0.012672
1       1       -0.0461441      0.0144468       0.0127385       -0.00764761     -0.0210643
root@DESKTOP-1N42TVH:/home/test# /home/software/gemma-0.98.5-linux-static-AMD64 -bfile gwas_test -gk -o kin
root@DESKTOP-1N42TVH:/home/test# /home/software/gemma-0.98.5-linux-static-AMD64 -bfile gwas_test -k output/kin.cXX.txt -c cov.txt -lm -o result
root@DESKTOP-1N42TVH:/home/test# head output/result.assoc.txt   ## 结果文件
chr     rs      ps      n_mis   n_obs   allele1 allele0 af      beta    se      p_wald
1       snp1    2802    0       541     G       T       0.099   -1.082833e+00   7.674582e+00    8.878495e-01
1       snp2    2823    0       541     T       C       0.063   9.534796e+00    9.185000e+00    2.997019e-01
1       snp3    4512    0       541     G       A       0.067   1.283873e+01    8.966175e+00    1.527564e-01
1       snp4    16529   0       541     T       C       0.055   8.905339e+00    1.019784e+01    3.829161e-01
1       snp5    16578   0       541     G       C       0.065   -6.530092e+00   9.144376e+00    4.754717e-01
1       snp6    16579   0       541     C       A       0.275   -3.613338e+00   5.192970e+00    4.868490e-01
1       snp7    16635   0       541     G       C       0.088   8.206132e+00    7.909573e+00    2.999762e-01
1       snp8    20879   0       541     T       G       0.130   8.057337e+00    6.678232e+00    2.281571e-01
1       snp9    20908   0       541     C       T       0.167   1.355591e+00    6.265772e+00    8.287988e-01

 

标签:gwas,01,plink,gemma,00,541,test,home
来源: https://www.cnblogs.com/liujiaxin2018/p/16464408.html