利用核酸序列估算分歧时间
前期准备
使用phylosuite对叶绿体基因提取,比对,串联和建树
期间发现的问题:
- 部分物种注释缺失
Species accD atpA atpB atpE atpF atpH atpI cemA chlB chlL chlN clpP ilvH matK ndhK petA petB petD petG psbA psbA_copy2 psbD psbE psbF psbI psbJ psbK psbL psbM psbN psbT psbZ rpl14 rpl16 rpl2 rpl20 rpl22 rpl23 rpl32 rpl33 rpl36 rpoA rpoB rpoC1 rpoC2 rps11 rps12 rps12_copy2 rps12_copy3 rps14 rps15 rps16 rps18 rps19 rps2 rps3 rps4 rps7 rps7_copy2 rps8 ycf1 ycf2 ycf3 ycf4
加黑基因去除,去除后共计57种基因
1 tre文件处理
modeltest中发现使用modelfinder查找模型速度很慢,可能是数据问题,把之前的数据去除重复序列后重新mafft,再串联和modelfinder,速度上升很多
分析过程发现重复序列,于是删除 重复序列
外类群选择:根据实验选择
-
去除枝长信息
cat species.tre |sed -r 's/:[0-9\.]+//g' |sed -r 's/\)[0-9\.]+/)/g'>species_formated.tre
查找分化时间-http://timetree.org/
-
添加分化时间,单位是100Mya
可以使用去掉枝长等信息的tre文件,用figtree打开,给分化枝加颜色信息,再打开去除掉figtree添加的枝长信息,即可对照生成合适的tre文件,注意应在第一行写入物种数和树数,空格分开
81 1 (Ectocarpus_siliculosus_FP102343,(((((Conocephalum_salebrosum_MT023022,Wiesnerella_denudata_NC_050394)'>1.203<1.626',(Dumortiera_hirsuta_NC_039590)),Reboulia_hemisphaerica_MK477551),Marchantia_emarginata_subsp__cuneiloba_LC749600)'<2.152>1.190',(((Andreaea_regularis_NC_070057,(Eosphagnum_rigescens_KU725456,((Flatbergium_novo_caledoniae_KU725454,Flatbergium_sericeum_KU725458),(((((((((((((GZ1_GZ1__GZ1,HBD_2_HBD_2__HBD_2_r_ds_from),(MT2_MT2__MT2,TC2_2__Contigs__TC2_2_)),Sphagnum_centrale_KU725466),Sphagnum_palustre_KU726621),Sphagnum_magellanicum_KU725440),MT1_MT1__MT1),Sphagnum_papillosum_KU725474),HNZW_HNZW__HNZW),(HND_2_HND_2__HND_2_r_ds_from,(Sphagnum_austinii_KU725462,Sphagnum_portoricense_KU725469))),Sphagnum_australe_KU725452),((((((((GZ3_GZ3__GZ3_3_r_ds_from,GZ4_GZ4__GZ4_3_r_ds_from),Sphagnum_capillifolium_KU725443),(HNXS_HNXS__HNXS,Sphagnum_fuscum_KU725465)),(Sphagnum_bartlettianum_KU725444,Sphagnum_rubellum_KU725473)),(HNJY_2_HNJY_2__HNJY_2__ads_fro,XJX_XJX__XJX)),((JX1_JX1__JX1,tc3_tc3__tc3),Sphagnum_subnitens_KU725472)),(Sphagnum_aongstroemii_KU725451,(Sphagnum_girgensohnii_KU725439,(Sphagnum_rubiginosum_KU725449,sc2_sc2__sc2)))),((((HNCY_2_HNCY_2__HNCY_2__ads_fro,cbcy_cbcy__CBCY),(Sphagnum_squarrosum_KU725464,sc11_sc11__sc11)),Sphagnum_teres_KU725438),Sphagnum_wulfianum_KU725459))),(((((((GZ2_GZ2__GZ2,GZ5_GZ5__GZ5),Sphagnum_cuspidatum_KU725471),Sphagnum_majus_KU725470),(((Sphagnum_angustifolium_KU725442,Sphagnum_fallax_KU725463),Sphagnum_balticum_KU725468),(Sphagnum_obtusum_KU725445,Sphagnum_recurvum_KU725467))),Sphagnum_riparium_KU725448),Sphagnum_contortum_KU725460),((((((GZ6_GZ6__GZ6,TC1_Contigs_1_TC1_5),((YN5__4_YN5__4__Contigs__YN5__4,yn2_yn2__yn2),yn1_yn1__yn1)),HNHY_HNHY__HNHY),(Sphagnum_lenense_KU725446,Sphagnum_orientale_KU725447)),((Sphagnum_falcatulum_KU725441,Sphagnum_tumidulum_KU725455),Sphagnum_lescurii_KU725457)),Sphagnum_pylaesii_KU725461))),(Sphagnum_compactum_KU725453,Sphagnum_strictum_KU725450))))'<3.804>3.550'),((((Ditrichum_rhynchostegium_LC716918,Trematodon_longicollis_LC761299),Fissidens_protonematicola_LC761303),Timmiella_anomala_LC761301),((Entosthodon_attenuatus_NC_058543,Physcomitrium_patens_NC_005087),Funaria_hygrometrica_NC_058544))'<2.248>1.217'),(Anthoceros_angustus_AB086179,(Azolla_filiculoides_MF177094,Azolla_rubra_MF177091)'<0.172>0.022'))));
2 fas序列保存为phylip_paml格式
trimal -in 86.mafft.fas -out 86.trimal.fas -automated1 -phylip_paml
3 ctl文件处理
-
ctl文件处理
seed = -1 seqfile = input.phy treefile = input.tree outfile = out.txt ndata = 1 seqtype = 0 * 0: nucleotides; 1:codons; 2:AAs usedata = 3 * 0: no data; 1:seq like; 2:use in.BV; 3: out.BV clock = 2 * 1: global clock; 2: independent rates; 3: correlated rates RootAge = * safe constraint on root age, used if no fossil for root. model = 7 * 0:JC69, 1:K80, 2:F81, 3:F84, 4:HKY85 alpha = 0.5 * alpha for gamma rates at sites ncatG = 5 * No. categories in discrete gamma cleandata = 0 * remove sites with ambiguity data (1:yes, 0:no)? BDparas = 1 1 0 * birth, death, sampling kappa_gamma = 6 2 * gamma prior for kappa alpha_gamma = 1 1 * gamma prior for alpha rgene_gamma = 2 2 * gamma prior for overall rates for genes sigma2_gamma = 1 10 * gamma prior for sigma^2 (for clock=2 or 3) finetune = 1: .1 .1 .1 .1 .01 .5 * auto (0 or 1) : times, musigma2, rates, mixing, paras, FossilErr print = 1 burnin = 10000 sampfreq = 5 nsample = 30000 *** Note: Make your window wider (100 columns) before running the program.
报错:
Error: check #seqs and tree: perhaps too many '('?.
问题原因:tree文件或序列文件有问题(大概是tre文件有问题,重新跑树)
问题解决:原因为在跑完树后对树修剪,导致部分node自带括号。重新跑树加时间后解决
代码片段_通过PAML中的CODEML模块计算dnds的过程以及踩坑
(((((Conocephalum_salebrosum_MT023022,Wiesnerella_denudata_NC_050394),Dumortiera_hirsuta_NC_039590),Reboulia_hemisphaerica_MK477551),Marchantia_emarginata_subsp__cuneiloba_LC749600),((((((Ditrichum_rhynchostegium_LC716918,Trematodon_longicollis_LC761299),Fissidens_protonematicola_LC761303),Timmiella_anomala_LC761301),((Entosthodon_attenuatus_NC_058543,Physcomitrium_patens_NC_005087),Funaria_hygrometrica_NC_058544)),(Andreaea_regularis_NC_070057,(Eosphagnum_rigescens_KU725456,((Flatbergium_novo_caledoniae_KU725454,Flatbergium_sericeum_KU725458),(((((((((((((GZ1_GZ1__GZ1,HBD_2_HBD_2__HBD_2_r_ds_from),(MT2_MT2__MT2,TC2_2__Contigs__TC2_2_)),Sphagnum_centrale_KU725466),Sphagnum_palustre_KU726621),Sphagnum_magellanicum_KU725440),MT1_MT1__MT1),Sphagnum_papillosum_KU725474),HNZW_HNZW__HNZW),(HND_2_HND_2__HND_2_r_ds_from,(Sphagnum_austinii_KU725462,Sphagnum_portoricense_KU725469))),Sphagnum_australe_KU725452),((((((((GZ3_GZ3__GZ3_3_r_ds_from,GZ4_GZ4__GZ4_3_r_ds_from),Sphagnum_capillifolium_KU725443),(HNXS_HNXS__HNXS,Sphagnum_fuscum_KU725465)),(Sphagnum_bartlettianum_KU725444,Sphagnum_rubellum_KU725473)),(HNJY_2_HNJY_2__HNJY_2__ads_fro,XJX_XJX__XJX)),((JX1_JX1__JX1,tc3_tc3__tc3),Sphagnum_subnitens_KU725472)),(Sphagnum_aongstroemii_KU725451,(Sphagnum_girgensohnii_KU725439,(Sphagnum_rubiginosum_KU725449,sc2_sc2__sc2)))),((((HNCY_2_HNCY_2__HNCY_2__ads_fro,cbcy_cbcy__CBCY),(Sphagnum_squarrosum_KU725464,sc11_sc11__sc11)),Sphagnum_teres_KU725438),Sphagnum_wulfianum_KU725459))),(((((((GZ2_GZ2__GZ2,GZ5_GZ5__GZ5),Sphagnum_cuspidatum_KU725471),Sphagnum_majus_KU725470),(((Sphagnum_angustifolium_KU725442,Sphagnum_fallax_KU725463),Sphagnum_balticum_KU725468),(Sphagnum_obtusum_KU725445,Sphagnum_recurvum_KU725467))),Sphagnum_riparium_KU725448),Sphagnum_contortum_KU725460),((((((GZ6_GZ6__GZ6,TC1_Contigs_1_TC1_5),((YN5__4_YN5__4__Contigs__YN5__4,yn2_yn2__yn2),yn1_yn1__yn1)),HNHY_HNHY__HNHY),(Sphagnum_lenense_KU725446,Sphagnum_orientale_KU725447)),((Sphagnum_falcatulum_KU725441,Sphagnum_tumidulum_KU725455),Sphagnum_lescurii_KU725457)),Sphagnum_pylaesii_KU725461))),(Sphagnum_compactum_KU725453,Sphagnum_strictum_KU725450))))‘>3.550<3.804’)),Anthoceros_angustus_AB086179));