从tassel到phylip-构建群体进化树

发布时间 2023-06-12 20:14:29作者: 爱吃娃娃菜

1.用tassel将VCF文件转换为phylip 格式

run_pipeline.pl -Xmx10G -importGuess your.vcf -ExportPlugin -saveAs your.phy -format Phylip_Inter # run_pipeline.pl是tassel里的一个程序

# vcf文件应该只包含SNP信息,不能有indel信息,因为INDEL位点在转换为phy文件时,会变成-或者0,这个0在phylip软件运行时识别不了会报错,也可以把0转换为-

2.构建进化树

2.1 seqboot:重抽样,生成随机样本。

$ your/file/seqboot

your.phy

R #选择bootstrap
1000 #设置bootstrap的值,即重复的replicate的数目,通常使用1000或者100,注意此处设定好后,后续两步的M值也为1000或者100
Y #yes确认以上设定的参数
9 #设定随机参数,输入奇数值。

$ seqboot < seqboot.bar
$ mv outfile seqboot.out

 

2.2 dnadist:计算距离矩阵,最耗时,几千个SNP可能需要1天甚至数天。

$your/file/dnadist

seqboot.out
T #选择设定Transition/transversion的比值
2 #比值大小
M #修改M值
D #修改M值
1000 #设定M值大小
2 #将软件运行情况显示出来
Y #确认以上设定的参数

$ dnadist < dnadist.par
$ mv outfile dnadist.out

 

2.3 neighbor: Neighbor-Joining 建树。

$your/file/neighbor

dnadist.out
M
1000 #设定M值大小
9 #设定随机数,输入奇数值
Y #确认以上设定的参数

$ neighbor < neighbor.par
$ mv outfile neighbor.out
$ mv outtree neighbor.tree

2.4 consense:将多重树汇总成一个。

$your/file/consense

neighbor.tree
#确认以上设定的参数
Y

$ consense < consense.par
$ mv outfile consense.out
$ mv outtree consense.tree

#主要参考https://blog.csdn.net/Gossie/article/details/110351036