使用hiblup计算基因频率和基因型频率
001、测试数据
(base) [root@PC1 test]# ls ## 测试数据, plink格式 outcome.map outcome.ped (base) [root@PC1 test]# cat outcome.map 1 snp1 0 55910 1 snp2 0 85204 1 snp3 0 122948 1 snp4 0 203750 1 snp5 0 312707 (base) [root@PC1 test]# cat outcome.ped DOR 1 0 0 0 -9 T T C C A A G G A G DOR 2 0 0 0 -9 T T G C G G G G G G DOR 3 0 0 0 -9 G G C C G G G G G G DOR 4 0 0 0 -9 G G C C G G G G G G DOR 5 0 0 0 -9 G G C C G G G G G G DOR 6 0 0 0 -9 G G C C G G G G G G (base) [root@PC1 test]# plink --file outcome --make-bed --out outcome &> /dev/null (base) [root@PC1 test]# ls ## 使用--make-bed转化为二进制 outcome.bed outcome.fam outcome.map outcome.ped outcome.bim outcome.log outcome.nosex
002、使用hiblup计算基因频率
(base) [root@PC1 test]# ls outcome.bed outcome.fam outcome.map outcome.ped outcome.bim outcome.log outcome.nosex (base) [root@PC1 test]# hiblup --bfile outcome --allele-freq --out test &> /dev/null (base) [root@PC1 test]# ls ## 计算基因频率 outcome.bed outcome.fam outcome.map outcome.ped test.log outcome.bim outcome.log outcome.nosex test.afreq (base) [root@PC1 test]# cat test.afreq ## 计算结果 SNP a1 a2 freq_a1 snp1 T G 0.333333 snp2 G C 0.0833333 snp3 A G 0.166667 snp4 0 G 0 snp5 A G 0.0833333 (base) [root@PC1 test]# cat outcome.ped DOR 1 0 0 0 -9 T T C C A A G G A G DOR 2 0 0 0 -9 T T G C G G G G G G DOR 3 0 0 0 -9 G G C C G G G G G G DOR 4 0 0 0 -9 G G C C G G G G G G DOR 5 0 0 0 -9 G G C C G G G G G G DOR 6 0 0 0 -9 G G C C G G G G G G
003、使用hiblup计算基因型频率
(base) [root@PC1 test]# ls outcome.bed outcome.fam outcome.map outcome.ped outcome.bim outcome.log outcome.nosex (base) [root@PC1 test]# hiblup --bfile outcome --geno-freq --out test &> /dev/null (base) [root@PC1 test]# ls ## 计算基因型频率 outcome.bed outcome.fam outcome.map outcome.ped test.log outcome.bim outcome.log outcome.nosex test.gfreq (base) [root@PC1 test]# cat test.gfreq ## 计算结果 SNP a1 a2 freq_a1a1 freq_a2a2 snp1 T G 0.333333 0.666667 snp2 G C 0 0.833333 snp3 A G 0.166667 0.833333 snp4 0 G 0 1 snp5 A G 0 0.833333 (base) [root@PC1 test]# cat outcome.ped DOR 1 0 0 0 -9 T T C C A A G G A G DOR 2 0 0 0 -9 T T G C G G G G G G DOR 3 0 0 0 -9 G G C C G G G G G G DOR 4 0 0 0 -9 G G C C G G G G G G DOR 5 0 0 0 -9 G G C C G G G G G G DOR 6 0 0 0 -9 G G C C G G G G G G
参考:https://mp.weixin.qq.com/s/YUyL1Bq0fDKojGHSLf0MkQ
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
2022-05-28 linux 中如何删除^M(dos2unix异常)
2021-05-28 c语言中指针作为参数的函数同时计算两个数的和与差
2021-05-28 c语言中将指针作为函数的参数。
2021-05-28 c语言中指针