使用 phylip构建进化树

 

001、测试数据转换为vcf格式

[root@PC1 test]# ls
test.map  test.ped
[root@PC1 test]# plink --file test --recode vcf-iid --out test

 

 

 

002、将vcf转为phylip格式文件

[root@PC1 test]# /opt/TASSEL5/run_pipeline.pl -importGuess  test.vcf -ExportPlugin -saveAs test.phy -format Phylip_Inter
[root@PC1 test]# ls
test.map  test.ped  test.phy  test.vcf

 

 

003、生成dandist的配置文件

[root@PC1 test]# echo -e "test.phy\nY" > dnadist.cfg
[root@PC1 test]# ls
dnadist.cfg  test.map  test.ped  test.phy  test.vcf

 

 

004、运行dnadist程序,生成距离矩阵文件

[root@PC1 test]# /home/software/phylip/phylip-3.697/exe/dnadist < dnadist.cfg  >dnadist.log
[root@PC1 test]# ls
dnadist.cfg  dnadist.log  outfile  test.map  test.ped  test.phy  test.vcf

 

 

005、生成neighbor程序需要的配置文件

[root@PC1 test]# mv outfile infile.dist
[root@PC1 test]# ls
dnadist.cfg  dnadist.log  infile.dist  test.map  test.ped  test.phy  test.vcf
[root@PC1 test]# echo -e "infile.dist\nY"  > neighbor.cfg
[root@PC1 test]# ls
dnadist.cfg  dnadist.log  infile.dist  neighbor.cfg  test.map  test.ped  test.phy  test.vcf

 

 

006、构建nj树

[root@PC1 test]# /home/software/phylip/phylip-3.697/exe/neighbor  <  neighbor.cfg  >nj.log
[root@PC1 test]# ls
dnadist.cfg  dnadist.log  infile.dist  neighbor.cfg  nj.log  outfile  outtree  test.map  test.ped  test.phy  test.vcf

 

 

007、整理结果格式

[root@PC1 test]# less infile.dist | tr '\n' '|'| sed 's/| / /g' | tr '|' '\n' >infile.dist.table
[root@PC1 test]# ls
dnadist.cfg  dnadist.log  infile.dist  infile.dist.table  neighbor.cfg  nj.log  outfile  outtree  test.map  test.ped  test.phy  test.vcf
[root@PC1 test]# less outtree | tr '\n' ' '|sed 's/ //g' > outtree.nwk
[root@PC1 test]# ls
dnadist.cfg  dnadist.log  infile.dist  infile.dist.table  neighbor.cfg  nj.log  outfile  outtree  outtree.nwk  test.map  test.ped  test.phy  test.vcf

 

 

008、利用 outtree.nwk 文件在itol网页中构树

01、进入itol官网

 

 

02、点击upload a tree

 

 

 

 

03、上传文件

 

 

04、草图

参考:https://mp.weixin.qq.com/s?__biz=Mzg4NDc4MjkxNA==&mid=2247488928&idx=1&sn=ee10c8b8020b80696c2cc88f3eb1ad2a&chksm=cfb3b78df8c43e9bf2b420ecb654e0306b9da1947c4e390f74ca57ff2985c57c9b396a27b423&scene=178&cur_album_id=2485246989195051008#rd

 

posted @ 2022-12-31 13:13  小鲨鱼2018  阅读(1053)  评论(2编辑  收藏  举报