软件文章网址https://doi.org/10.1093/molbev/msx235
A phylogenetic network is a phylogenetic tree with added hybrid edges ([Huson et al. 2010](javascript:;)). Networks can explicitly describe various biological processes such as hybridization, introgression, or horizontal transfer.
感觉下面的方法是按照倒叙写的,哈哈
根据多个位点比对结果,构建进化网络
运行命令就是下面的一行命令,work_PhyloNetworks.jl是配置文件
julia-1.6.3/bin/julia -p 20 work_PhyloNetworks.jl
下面脚本是work_PhyloNetworks.jl的具体内容
using PhyloNetworks
#using Gadfly
astraltree=readMultiTopology("astral_517.tre")[1]
raxmlCF=readTrees2CF("all_contree_517_unmodified.tree")
net0=snaq!(astraltree, raxmlCF, hmax=0, filename="net0", outgroup="Gbil")
net1=snaq!(net0, raxmlCF, hmax=1, filename="net1", outgroup="Gbil")
net2=snaq!(net1, raxmlCF, hmax=2, filename="net2", outgroup="Gbil")
net3=snaq!(net2, raxmlCF, hmax=3, filename="net3", outgroup="Gbil")
net4=snaq!(net3, raxmlCF, hmax=4, filename="net4", outgroup="Gbil")
net5=snaq!(net4, raxmlCF, hmax=5, filename="net5", outgroup="Gbil")
net6=snaq!(net5, raxmlCF, hmax=6, filename="net6", outgroup="Gbil")
net7=snaq!(net6, raxmlCF, hmax=7, filename="net7", outgroup="Gbil")
net8=snaq!(net7, raxmlCF, hmax=8, filename="net8", outgroup="Gbil")
net9=snaq!(net8, raxmlCF, hmax=9, filename="net9", outgroup="Gbil")
net10=snaq!(net9, raxmlCF, hmax=10, filename="net10", outgroup="Gbil")
#scores=[net0.loglik, net1.loglik, net2.loglik, net3.loglik, net4.loglik, net5.loglik, net6.loglik, net7.loglik, net8.loglik, net9.loglik, net10.loglik]
#plot(x=collect(0:10), y=scores, Geom.point, Geom.line, Guide.xlabel("number of hybrid nodes"), Guide.ylabel("score"))
上面脚本可以看出输入文件有两个:
1,astral_517.tre
此文件为newick格式的进化树,是你最终得到的进化树
2,all_contree_517_unmodified.tree
此文件也是newick格式的进化树,但是是多个进化树,每行一个进化树,是每个位点构建一个进化树。可以是比较基因组每个单拷贝直系同源基因构建的进化树,也可以是重测序数据,每个窗口snp构建的进化树。
得到结果文件
画图
julia-1.6.3/bin/julia 运行下列脚本
using PhyloNetworks
using PhyloPlots
using RCall
net1 = readTopology("((AAA,BBB)1:0.06821223998628531,((((CCC,(DDD,EEE)1:2.097616841918044)1:0.1417498087261607,(FFF,((GGG,HHH)1:0.4612938131446619,III)1:0.4877011823760434)1:0.8074943460580625)1:1.2429504074991482,(#H47:::0.21299940676443946,GGG)1:2.108686041448839)0.5:0.07885816060483428,(KKK,((((LLL,MMM)1:0.2377959998113563,(NNN,(OOO,PPP)1:0.33321909390192367)1:0.6804171093378896)1:0.06889537269363685,(QQQ,RRR):0.7997221437904402)1:1.2546300209480972,(SSS,(((TTT,UUU)1:2.3419815347953796,(VVV,WWW)1:2.911668044893331)1:0.8916847842646263)#H47:::0.7870005932355606)1:0.26781684936100597)1:0.0974708255341442)0.82:0.13692686984097024):0.9606992591200036,(XXX,YYY)1:5.287876696707258)1;")
R"pdf"("net1.pdf")
plot(net1, :R, showGamma=true, tipOffset=0.2);
R"dev.off()";
得到类似文章中这个图片结果