Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for beast1 trees #4

Merged
merged 1 commit into from
Dec 5, 2017
Merged

Conversation

brj1
Copy link
Contributor

@brj1 brj1 commented Nov 30, 2017

BEAST1 trees have a separate annotation ([] block) for edge statistics. I have added a simple gsub to move these edge statistic into the child node's [] block. Should be checked to make sure it doesn't break BEAST2 or MrBayes input.

@GuangchuangYu
Copy link
Member

can you show me a sample file?

@brj1
Copy link
Contributor Author

brj1 commented Dec 4, 2017

@GuangchuangYu good point. Should have included a sample file in the original comment. Below is a BEAST MCC tree with edge and node labels:

#NEXUS

Begin taxa;
        Dimensions ntax=3;
                Taxlabels
                        A 
                        B 
                        C
                        ;
End;
Begin trees;
        Translate
                   1 A,
                   2 B,
                   3 C
;
tree TREE1 = ((1[&CAheight_95%_HPD={2.0,2.0},CAheight_mean=2.000000000000547,CAheight_median=2.0,CAheight_range={1.9999999925494194,2.0000000037252903},height=2.000000000000547,height_95%_HPD={2.0,2.0},height_median=2.0,height_range={1.9999999925494194,2.0000000037252903},length=2834930.3245687396,length_95%_HPD={4.5322847785911335E-7,3210069.1310857427},length_median=592.2305925267933,length_range={4.5322847785911335E-7,8.11707645413261E8}]:[&rate=0.2251989329521874]3083841.84329081,3[&height=0.0,length=2713072.248496289,length_95%_HPD={1.0000003349406112,2416624.501945139},length_median=528.8605337547945,length_range={1.0000003349406112,6.182983904292479E8}]:[&rate=0.18725298854092004]3083843.84329081)[&CAheight_95%_HPD={2.000000453228478,3253653.683173018},CAheight_mean=3083843.84329081,CAheight_median=620.7931117452017,CAheight_range={2.000000453228478,8.11707647413261E8},height=2410942.7176328185,height_95%_HPD={2.009902997989793,3628571.079051025},height_median=1901.2532006007716,height_range={2.009902997989793,3.6673006688830227E8},length=3457298.61067839,length_95%_HPD={0.03872077354411019,7455062.0960760005},length_median=2084.8026205375136,length_range={0.03872077354411019,7.144955879869821E8},posterior=0.5844155844155844]:[&rate=0.18725298854092004]2020499.1880588154,2[&CAheight_95%_HPD={1.0,1.0},CAheight_mean=1.0000000000541633,CAheight_median=1.0,CAheight_range={0.9999999925494194,1.0000000298023224},height=1.0000000000541633,height_95%_HPD={1.0,1.0},height_median=1.0,height_range={0.9999999925494194,1.0000000298023224},length=4484658.917833006,length_95%_HPD={3.349406112462816E-7,5251040.510663153},length_median=995.0172440302828,length_range={3.349406112462816E-7,8.688976551071846E8}]:[&rate=0.2251989329521874]5104342.031349625)[&CAheight_95%_HPD={2.000000453228478,5688307.884085689},CAheight_mean=5104343.031349625,CAheight_median=1160.6998262789216,CAheight_range={2.000000453228478,8.688976561071846E8},height=5104343.031349625,height_95%_HPD={2.000000453228478,5688307.884085689},height_median=1160.6998262789216,height_range={2.000000453228478,8.688976561071846E8},length=0.0,posterior=1.0]:0.0;
End;

and below is BEAST output trees with only edge labels:

#NEXUS

Begin taxa;
        Dimensions ntax=3;
        Taxlabels
                A
                B
                C
                ;
End;

Begin trees;
        Translate
                1 A,
                2 B,
                3 C
                ;
tree STATE_0 [&lnP=-95.3020519341521,posterior=-95.3020519341521] = [&R] ((3:[&rate=1.3880421571601016]1.6689248074925112,2:[&rate=0.8506379510097705]0.6689248074925112):[&rate=0.8506379510097705]0.46581028556047555,1:[&rate=1.3880421571601016]0.1347350930529867);
tree STATE_1000 [&lnP=-88.22859836900577,posterior=-88.22859836900577] = [&R] ((3:[&rate=0.694224305547195]1.1037967552638237,2:[&rate=0.694224305547195]0.1037967552638237):[&rate=0.4504210804279132]2.0119618685594043,1:[&rate=0.59371796508628]1.1157586238232278);
tree STATE_2000 [&lnP=-91.20052964537874,posterior=-91.20052964537874] = [&R] ((3:[&rate=0.6689126745043742]1.4203985816048632,2:[&rate=0.9250865309540556]0.4203985816048632):[&rate=0.9250865309540556]2.518077356011755,1:[&rate=0.7520968213075985]1.938475937616618);
tree STATE_3000 [&lnP=-92.67319676188792,posterior=-92.67319676188792] = [&R] (1:[&rate=0.2974710855444227]3.280103512345277,(3:[&rate=0.2749465345673039]3.005260223342425,2:[&rate=0.31597087295259474]2.005260223342425):[&rate=0.2974710855444227]2.274843289002852);
tree STATE_4000 [&lnP=-89.30047392752222,posterior=-89.30047392752222] = [&R] (1:[&rate=0.14597561635027997]1.8108992013667322,(3:[&rate=0.20658037257601722]2.1990389045499126,2:[&rate=0.26955215050614034]1.1990389045499126):[&rate=0.26955215050614034]1.6118602968168196);
tree STATE_5000 [&lnP=-90.73083104812345,posterior=-90.73083104812345] = [&R] ((1:[&rate=0.2251989329521874]1.6003834801291412,3:[&rate=0.18725298854092004]3.6003834801291412):[&rate=0.18725298854092004]0.058291436005251995,2:[&rate=0.2251989329521874]2.658674916134393);
tree STATE_6000 [&lnP=-107.03439468461279,posterior=-107.03439468461279] = [&R] ((1:[&rate=3.3144636284164476E-7]2192639.2325360207,3:[&rate=1.8869358160709503E-7]2192641.2325360207):[&rate=1.8869358160709503E-7]1002485.1142192362,2:[&rate=2.4093183697689714E-7]3195125.346755257);
tree STATE_7000 [&lnP=-107.6438424770727,posterior=-107.6438424770727] = [&R] (2:[&rate=8.537291767635979E-7]1603782.5955367046,(1:[&rate=2.8142814688149226E-7]1111537.9913937168,3:[&rate=4.203344094150805E-7]1111539.9913937168):[&rate=4.203344094150805E-7]492243.60414298787);
tree STATE_8000 [&lnP=-108.70870132386068,posterior=-108.70870132386068] = [&R] (1:[&rate=1.2348426348373106E-7]4860685.164513814,(3:[&rate=1.0419279672883432E-7]3331632.6665230626,2:[&rate=1.4064982424081668E-7]3331631.6665230626):[&rate=1.0419279672883432E-7]1529054.4979907516);
tree STATE_9000 [&lnP=-103.48112083916891,posterior=-103.48112083916891] = [&R] (2:[&rate=4.68298026471393E-6]477678.53490448877,(1:[&rate=4.68298026471393E-6]63831.352737888184,3:[&rate=4.68298026471393E-6]63833.352737888184):[&rate=3.940669282726728E-6]413846.1821666006);
tree STATE_10000 [&lnP=-106.24681538261387,posterior=-106.24681538261387] = [&R] (2:[&rate=1.1435093846694469E-7]6127790.286353968,(3:[&rate=1.1435093846694469E-7]1762021.2621412443,1:[&rate=1.371764450941561E-7]1762019.2621412443):[&rate=1.0315471499638646E-7]4365770.024212724);
End;

@GuangchuangYu GuangchuangYu merged commit 518403b into YuLab-SMU:master Dec 5, 2017
@GuangchuangYu
Copy link
Member

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants