Josh Williams
unread,Jun 23, 2011, 2:01:04 PM6/23/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to beast-users
Hello,
I was wondering if there was a way to convert the trees in the
posterior distribution output from *BEAST into a normal newick
format. Because the *BEAST trees have extra formatting, like below
(one of my trees from a posterior distribution):
(((10[&dmt=0.02206435630732423,dmv={0.0015318154101832844,0.0012792327564427849}]:
0.02206435630732423,19[&dmt=0.02206435630732423,dmv={0.0012575360937068123,4.3506438909926565E-4}]:
0.02206435630732423)
[&dmt=0.0010174828192912808,dmv={0.0017142971455420505,6.354980232855838E-4}]:
0.0010174828192912808,
(((14[&dmt=0.013097384448157386,dmv={0.003334053503411882,7.110718550766282E-4}]:
0.013097384448157386,
(((5[&dmt=0.008185322363632397,dmv={0.0012159849793191714,0.002530337747765068}]:
0.008185322363632397,
(9[&dmt=6.658051678474632E-4,dmv={0.0014839010986993648,2.989576703566814E-4}]:
6.658051678474632E-4,7[&dmt=6.658051678474632E-4,dmv={2.0339680458229969E-4,5.235734025067074E-4}]:
6.658051678474632E-4)
[&dmt=0.007519517195784933,dmv={8.225310728633888E-4,0.0012876450265545993}]:
0.007519517195784933)
[&dmt=0.0033552069921444824,dmv={0.003817982774319667,0.0018426717952679398}]:
0.0033552069921444824,
(8[&dmt=0.005948936924932965,dmv={0.0011248216819087825,2.923628075709584E-4}]:
0.005948936924932965,
((16[&dmt=6.516800881489398E-4,dmv={4.953744723140805E-4,5.26813642106332E-4}]:
6.516800881489398E-4,18[&dmt=6.516800881489398E-4,dmv={6.203159804153562E-4,6.891815689353816E-4}]:
6.516800881489398E-4)
[&dmt=0.0011330263592933725,dmv={0.0012159952110417137,4.986714733565607E-4}]:
0.0011330263592933725,21[&dmt=0.0017847064474423124,dmv={0.0014498795409704,0.0037975062728661645}]:
0.0017847064474423124)
[&dmt=0.004164230477490653,dmv={0.004296177746222725,1.4106767709719863E-4}]:
0.004164230477490653)
[&dmt=0.005591592430843915,dmv={4.33430484668157E-4,7.524091177704563E-4}]:
0.005591592430843915)
[&dmt=5.331322059317269E-4,dmv={0.0025950809130383962,0.0025264007095689715}]:
5.331322059317269E-4,
((13[&dmt=0.008083387312868662,dmv={5.18202045617277E-4,0.0011255950549218519}]:
0.008083387312868662,
(20[&dmt=0.004419835892021963,dmv={0.0025901456499011926,7.911903112748847E-4}]:
0.004419835892021963,6[&dmt=0.004419835892021963,dmv={0.001471465825289436,3.805137519079202E-4}]:
0.004419835892021963)
[&dmt=0.0036635514208466996,dmv={0.0011717040631828049,0.0019504326318614006}]:
0.0036635514208466996)
[&dmt=0.0034501784182041917,dmv={0.0030760276867832525,6.646381135664681E-4}]:
0.0034501784182041917,
(12[&dmt=0.009906860743158523,dmv={2.727864491549159E-4,8.045377183801342E-4}]:
0.009906860743158523,11[&dmt=0.009906860743158523,dmv={6.908308540726824E-4,7.32503286239051E-4}]:
0.009906860743158523)
[&dmt=0.0016267049879143316,dmv={0.001537041004619185,0.0012370997952368809}]:
0.0016267049879143316)
[&dmt=5.40095830635752E-4,dmv={0.0019017379088033491,0.002279832839496191}]:
5.40095830635752E-4)
[&dmt=0.0010237228864487802,dmv={0.004806233549065163,0.0029234790073215076}]:
0.0010237228864487802)
[&dmt=0.001034439907625898,dmv={0.003634550862398136,0.0015069447696934796}]:
0.001034439907625898,17[&dmt=0.014131824355783284,dmv={0.0014846279604340989,8.588158929678985E-4}]:
0.014131824355783284)
[&dmt=0.0032559943958138503,dmv={0.002365760662661378,0.0012600843207181702}]:
0.0032559943958138503,15[&dmt=0.017387818751597135,dmv={0.0026049634239448073,1.888942048156249E-4}]:
0.017387818751597135)
[&dmt=0.005694020375018375,dmv={0.0014489785255337952,0.0011792952650256775}]:
0.005694020375018375)
[&dmt=0.05284077442184044,dmv={0.0018147932883112615,0.0013386020322460569}]:
0.05284077442184044,
(((1[&dmt=0.0016638785071647782,dmv={0.0010884276025815403,4.3677989727334063E-4}]:
0.0016638785071647782,3[&dmt=0.0016638785071647782,dmv={0.001674856423797966,0.0014774390178660464}]:
0.0016638785071647782)
[&dmt=9.14672243732859E-4,dmv={0.001914218915139387,0.0015284835020664535}]:
9.14672243732859E-4,2[&dmt=0.0025785507508976372,dmv={0.002665710191919657,3.181964841681323E-4}]:
0.0025785507508976372)
[&dmt=4.225355683184096E-5,dmv={0.0018466799862345857,4.461767149357939E-4}]:
4.225355683184096E-5,4[&dmt=0.002620804307729478,dmv={0.0012685836654021444,0.0025596560291543118}]:
0.002620804307729478)
[&dmt=0.07330180924072646,dmv={0.0030058327440901055,0.003816407000449406}]:
0.07330180924072646)
[&dmt=0.024966425112478957,dmv={0.005155009032695463,0.005155009032695463}];
But I would like to get all my trees into a standard newick format,
like so:
((D_tenebrosus:0.002620804307729478,(D_copei:0.0025785507508976372,
(D_aterrimus:0.0016638785071647782,D_ensatus:0.0016638785071647782):
9.14672243732859E-4):4.225355683184096E-5):0.07330180924072646,
((gracile:0.02206435630732423,talpoideum:0.02206435630732423):
0.0010174828192912808,(maculatum:0.017387818751597135,(opacum:
0.014131824355783284,(macrodactylum:0.013097384448157386,(((laterale:
0.009906860743158523,jeffersonianum:0.009906860743158523):
0.0016267049879143316,(mabeei:0.008083387312868662,(texanum:
0.004419835892021963,barbouri:0.004419835892021963):
0.0036635514208466996):0.0034501784182041917):5.40095830635752E-4,
((annulatum:0.008185322363632397,(cingulatum:
6.658051678474632E-4,bishopi:6.658051678474632E-4):
0.007519517195784933):0.0033552069921444824,(californiense:
0.005948936924932965,(tigrinum:0.0017847064474423124,(mexicanum:
6.516800881489398E-4,ordinarium:6.516800881489398E-4):
0.0011330263592933725):0.004164230477490653):0.005591592430843915):
5.331322059317269E-4):0.0010237228864487802):0.001034439907625898):
0.0032559943958138503):0.005694020375018375):0.05284077442184044);
I'm aware that FigTree can export BEAST trees in nexus or newick
format, but the problem is that, when I try to open one of my
posterior distributions in FigTree (my file has several thousand
trees), the program crashes, so I'm not able to export it in newick
format. I was wondering if there was some other way to overcome this,
or if maybe another program would be able to do such a thing? I tried
uploading my files into TreeEdit, but it wouldn't read it.
Thanks,
Josh