其他分享
首页 > 其他分享> > 使用GCTA软件进行GWAS分析

使用GCTA软件进行GWAS分析

作者:互联网

 

001、

root@PC1:/home/test# ls
gwas_test.bed  gwas_test.bim  gwas_test.fam
root@PC1:/home/test# awk '{print $1, $2, $6}' gwas_test.fam > phenotype.txt    ## 表型数据
root@PC1:/home/test# plink --bfile gwas_test --pca 3 1> /dev/null              ## pca协变量
root@PC1:/home/test# ls
gwas_test.bed  gwas_test.bim  gwas_test.fam  phenotype.txt  plink.eigenval  plink.eigenvec  plink.log              ## G矩阵
root@PC1:/home/test# /home/software/gcta_v1.94.0Beta_linux_kernel_3_x86_64/gcta_v1.94.0Beta_linux_kernel_3_x86_64_static --bfile gwas_test --make-grm --make-grm-alg 1 --out gmat 1> /dev/null
root@PC1:/home/test# ls
gmat.grm.bin  gmat.grm.N.bin  gwas_test.bed  gwas_test.fam  plink.eigenval  plink.log
gmat.grm.id   gmat.log        gwas_test.bim  phenotype.txt  plink.eigenvec                                      ## 稀疏矩阵
root@PC1:/home/test# /home/software/gcta_v1.94.0Beta_linux_kernel_3_x86_64/gcta_v1.94.0Beta_linux_kernel_3_x86_64_static --grm gmat --make-bK-sparse 0.05 --out gmat2 1> /dev/null
root@PC1:/home/test# ls
gmat2.grm.id  gmat2.log     gmat.grm.id     gmat.log       gwas_test.bim  phenotype.txt   plink.eigenvec
gmat2.grm.sp  gmat.grm.bin  gmat.grm.N.bin  gwas_test.bed  gwas_test.fam  plink.eigenval  plink.log               ## gwas分析
root@PC1:/home/test# /home/software/gcta_v1.94.0Beta_linux_kernel_3_x86_64/gcta_v1.94.0Beta_linux_kernel_3_x86_64_static --bfile gwas_test --grm-sparse gmat2 --fastGWA-mlm --pheno phenotype.txt --qcovar plink.eigenvec --out result 1> /dev/null
root@PC1:/home/test# ls
gmat2.grm.id  gmat2.log     gmat.grm.id     gmat.log       gwas_test.bim  phenotype.txt   plink.eigenvec  result.fastGWA
gmat2.grm.sp  gmat.grm.bin  gmat.grm.N.bin  gwas_test.bed  gwas_test.fam  plink.eigenval  plink.log       result.log
root@PC1:/home/test# head -n 5 result.fastGWA
CHR     SNP     POS     A1      A2      N       AF1     BETA    SE      P
1       snp1    2802    G       T       541     0.0988909       1.2972  7.79033 0.867753
1       snp2    2823    T       C       541     0.0628466       4.77428 9.37217 0.610465
1       snp3    4512    G       A       541     0.0665434       8.79444 9.16059 0.337041
1       snp4    16529   T       C       541     0.0545286       2.06676 10.1066 0.837966
root@PC1:/home/test# head -n 5 result.fastGWA | column -t    ## 结果文件
CHR  SNP   POS    A1  A2  N    AF1        BETA     SE       P
1    snp1  2802   G   T   541  0.0988909  1.2972   7.79033  0.867753
1    snp2  2823   T   C   541  0.0628466  4.77428  9.37217  0.610465
1    snp3  4512   G   A   541  0.0665434  8.79444  9.16059  0.337041
1    snp4  16529  T   C   541  0.0545286  2.06676  10.1066  0.837966

 

标签:GWAS,GCTA,--,gmat,gwas,home,test,软件,grm
来源: https://www.cnblogs.com/liujiaxin2018/p/16536291.html