标签:1N42TVH plink reference -- DESKTOP DOR test home test4
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
标签:1N42TVH,plink,reference,--,DESKTOP,DOR,test,home,test4 来源: https://www.cnblogs.com/liujiaxin2018/p/16479000.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。