plink实现将vcf文件转换为plink格式时FID和IID的变化

 

000、原始文件ID

[root@localhost test]# ls          ## 测试文件
test.vcf
[root@localhost test]# grep "^#" test.vcf | tail -n 1
#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  H10_sh

 

 

001、直接转换:

[root@localhost test]# ls
test.vcf
[root@localhost test]# plink --vcf test.vcf --allow-extra-chr --recode tab --out 001 1> /dev/null      ## plink直接转换
[root@localhost test]# ls
001.log  001.map  001.nosex  001.ped  test.vcf
[root@localhost test]# cut -f 1-10 001.ped                  ## 如果直接转换,则会将个体ID拆分为H10和sh
H10     sh      0       0       0       -9      C C     T T     A A     T T

 

002、--const-fid xxx 参数

[root@localhost test]# ls
test.vcf
[root@localhost test]# plink --vcf test.vcf --allow-extra-chr --const-fid xxx --recode tab --out 001 1> /dev/null    ## 使用--const-fid xxx 参数
[root@localhost test]# ls
001.log  001.map  001.nosex  001.ped  test.vcf
[root@localhost test]# cut -f 1-10 001.ped        ## FID为xxx,个体ID保持不变
xxx     H10_sh  0       0       0       -9      C C     T T     A A     T T

 

003、--double-id  参数

[root@localhost test]# ls
test.vcf
[root@localhost test]# plink --vcf test.vcf --allow-extra-chr --double-id --recode tab --out 001 1> /dev/null       ## 使用--double-id参数
[root@localhost test]# ls
001.log  001.map  001.nosex  001.ped  test.vcf
[root@localhost test]# cut -f 1-10 001.ped         ## FID和IID均为个体ID
H10_sh  H10_sh  0       0       0       -9      C C     T T     A A     T T

 

reference:

01、https://cloud.tencent.com/developer/article/1556166

 

posted @   小鲨鱼2018  阅读(20)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2024-02-16 [TileDB::Buffer] Error: Cannot read from buffer; End of buffer reached.
2023-02-16 linux 中while read循环结构中使用IFS指定分割符
2023-02-16 centos7 中编译安装vim 9.0
2023-02-16 Linux 中设置vim编辑器编写shell脚本自动缩进
2023-02-16 linux 中vim 编辑器 退格键 无法删除
2023-02-16 trimmomatic 质控报错:Error: Unable to detect quality encoding
2023-02-16 linux 中 grep命令中的 -F 选项
点击右上角即可分享
微信分享提示