plink 软件中 --reference-allele 参数 用于设定参考等位基因
001、
root@DESKTOP-1N42TVH:/home/test4# ls ## 测试数据 outcome.map outcome.ped root@DESKTOP-1N42TVH:/home/test4# cat outcome.map 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@DESKTOP-1N42TVH:/home/test4# cat outcome.ped DOR 1 0 0 0 -9 C G C C T T G G A G A A G G G C DOR 2 0 0 0 -9 C C 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 A A A A A G G C DOR 4 0 0 0 -9 G G C C T G T G G G A A G G G G DOR 5 0 0 0 -9 G G C C G G T 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 root@DESKTOP-1N42TVH:/home/test4# plink --file outcome --make-bed --out test &> /dev/null ## 转二进制 root@DESKTOP-1N42TVH:/home/test4# ls outcome.map outcome.ped test.bed test.bim test.fam test.log test.nosex root@DESKTOP-1N42TVH:/home/test4# cat test.bim 1 SNP1 0 55910 C G 1 SNP2 0 85204 G C 1 SNP3 0 122948 T G 1 SNP4 0 203750 T G 1 SNP5 0 312707 A G 1 SNP6 0 356863 0 A 1 SNP7 0 400518 A G 1 SNP8 0 487423 G C root@DESKTOP-1N42TVH:/home/test4# awk '{OFS = "\t"; print $2, $5}' test.bim | sed -e '1 s/.$/G/' -e '2 s/.$/C/' > a.txt root@DESKTOP-1N42TVH:/home/test4# cat a.txt ## 生成--reference-allele 参数需要文件,修改了前两个SNP的reference alleles SNP1 G SNP2 C SNP3 T SNP4 T SNP5 A SNP6 0 SNP7 A SNP8 G
002、测试命令
root@DESKTOP-1N42TVH:/home/test4# ls a.txt outcome.map outcome.ped test.bed test.bim test.fam test.log test.nosex root@DESKTOP-1N42TVH:/home/test4# plink --bfile test --reference-allele a.txt --make-bed --recode tab --out result &> /dev/null root@DESKTOP-1N42TVH:/home/test4# ls a.txt outcome.ped result.bim result.log result.nosex test.bed test.fam test.nosex outcome.map result.bed result.fam result.map result.ped test.bim test.log root@DESKTOP-1N42TVH:/home/test4# cat test.bim ## 原始reference allele 1 SNP1 0 55910 C G 1 SNP2 0 85204 G C 1 SNP3 0 122948 T G 1 SNP4 0 203750 T G 1 SNP5 0 312707 A G 1 SNP6 0 356863 0 A 1 SNP7 0 400518 A G 1 SNP8 0 487423 G C root@DESKTOP-1N42TVH:/home/test4# cat a.txt ## 计划改变为的reference allele,改变SNP1、SNP2 SNP1 G SNP2 C SNP3 T SNP4 T SNP5 A SNP6 0 SNP7 A SNP8 G root@DESKTOP-1N42TVH:/home/test4# cat result.bim ## 修改结果 1 SNP1 0 55910 G C 1 SNP2 0 85204 C G 1 SNP3 0 122948 T G 1 SNP4 0 203750 T G 1 SNP5 0 312707 A G 1 SNP6 0 356863 0 A 1 SNP7 0 400518 A G 1 SNP8 0 487423 G C root@DESKTOP-1N42TVH:/home/test4# cat outcome.ped ## 对比命令前后ped文件 DOR 1 0 0 0 -9 C G C C T T G G A G A A G G G C DOR 2 0 0 0 -9 C C 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 A A A A A G G C DOR 4 0 0 0 -9 G G C C T G T G G G A A G G G G DOR 5 0 0 0 -9 G G C C G G T 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 root@DESKTOP-1N42TVH:/home/test4# cat result.ped DOR 1 0 0 0 -9 G C C C T T G G A G A A G G G C DOR 2 0 0 0 -9 C C C G 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 A A A A A G G C DOR 4 0 0 0 -9 G G C C T G T G G G A A G G G G DOR 5 0 0 0 -9 G G C C G G T 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
分类:
生信
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
2021-07-14 c语言中整数类型的显示