使用GCTA (REML)来估计SNP(性状?)-遗传力

 

001、

复制代码
root@PC1:/home/test# ls
gwas_test.bed  gwas_test.bim  gwas_test.fam
root@PC1:/home/test# gcta64 --bfile gwas_test --make-grm --out gmat 1> /dev/null          ## 生成亲缘关系矩阵
root@PC1:/home/test# ls
gmat.grm.bin  gmat.grm.id  gmat.grm.N.bin  gmat.log  gwas_test.bed  gwas_test.bim  gwas_test.fam
root@PC1:/home/test# gcta64 --grm gmat --grm-cutoff 0.04 --make-grm --out gmat2 1> /dev/null    ## 剔除亲缘关系较近的个体
root@PC1:/home/test# ls
gmat2.grm.bin  gmat2.grm.N.bin  gmat.grm.bin  gmat.grm.N.bin  gwas_test.bed  gwas_test.fam
gmat2.grm.id   gmat2.log        gmat.grm.id   gmat.log        gwas_test.bim
root@PC1:/home/test# awk '{OFS = "\t"; print $1, $2, $6}' gwas_test.fam > phenotype.txt         ## 提取表型数据
root@PC1:/home/test# gcta64 --grm gmat2 --pheno phenotype.txt --reml --out heritability 1> /dev/null    ## 计算遗传力
root@PC1:/home/test# ls
gmat2.grm.bin  gmat2.grm.N.bin  gmat.grm.bin  gmat.grm.N.bin  gwas_test.bed  gwas_test.fam     heritability.log
gmat2.grm.id   gmat2.log        gmat.grm.id   gmat.log        gwas_test.bim  heritability.hsq  phenotype.txt
root@PC1:/home/test# cat heritability.hsq   ## 查看遗传力
Source  Variance        SE
V(G)    2746.572134     5196.829394
V(e)    3701.195986     4998.514624
Vp      6447.768120     848.295747
V(G)/Vp 0.425973        0.790360
logL    -602.427
logL0   -602.575
LRT     0.296
df      1
Pval    2.9307e-01
n       124
root@PC1:/home/test# ls
gmat2.grm.bin  gmat2.grm.N.bin  gmat.grm.bin  gmat.grm.N.bin  gwas_test.bed  gwas_test.fam     heritability.log
gmat2.grm.id   gmat2.log        gmat.grm.id   gmat.log        gwas_test.bim  heritability.hsq  phenotype.txt
root@PC1:/home/test# plink --bfile gwas_test --pca 10 1> /dev/null    ## 生成pca
root@PC1:/home/test# ls
gmat2.grm.bin    gmat2.log     gmat.grm.N.bin  gwas_test.bim     heritability.log  plink.eigenvec
gmat2.grm.id     gmat.grm.bin  gmat.log        gwas_test.fam     phenotype.txt     plink.log
gmat2.grm.N.bin  gmat.grm.id   gwas_test.bed   heritability.hsq  plink.eigenval
root@PC1:/home/test# gcta64 --grm gmat2 --pheno phenotype.txt --reml --qcovar plink.eigenvec --out heritability2 1> /dev/null  ## 把pca作为协变量
root@PC1:/home/test# ls
gmat2.grm.bin    gmat2.log     gmat.grm.N.bin  gwas_test.bim      heritability2.log  phenotype.txt   plink.log
gmat2.grm.id     gmat.grm.bin  gmat.log        gwas_test.fam      heritability.hsq   plink.eigenval
gmat2.grm.N.bin  gmat.grm.id   gwas_test.bed   heritability2.hsq  heritability.log   plink.eigenvec
root@PC1:/home/test# cat heritability2.hsq  ## 查看遗传力
Source  Variance        SE
V(G)    2674.861685     6039.792458
V(e)    3943.467510     5741.458624
Vp      6618.329195     934.087164
V(G)/Vp 0.404160        0.891956
logL    -544.303
logL0   -544.406
LRT     0.206
df      1
Pval    3.2493e-01
n       124
复制代码

 

参考:https://zhuanlan.zhihu.com/p/364046099

 

posted @   小鲨鱼2018  阅读(337)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2021-07-31 linux系统中scp命令实现服务器之间数据的传输
2021-07-31 SRA Toolkit的下载安装及使用
2021-07-31 NCBI中sra数据的下载
2018-07-31 linux 系统 grep 命令
点击右上角即可分享
微信分享提示