<?xml version="1.0" standalone="yes"?>
<!-- Generated by BEAUTi v1.4                                                -->
<!--       by Alexei J. Drummond and Andrew Rambaut                          -->
<!--       Department of Computer Science, University of Auckland and        -->
<!--       Institute of Evolutionary Biology, University of Edinburgh        -->
<!--       http://evolve.zoo.ox.ac.uk/beast/                                 -->
<beast>

    <!-- The list of taxa analyse (can also include dates/ages).                 -->
    <!-- ntax=6                                                                  -->
    <taxa id="taxa">
        <taxon id="human"/>
        <taxon id="chimp"/>
        <taxon id="bonobo"/>
        <taxon id="gorilla"/>
        <taxon id="orangutan"/>
        <taxon id="siamang"/>
    </taxa>

    <!-- The sequence alignment (each sequence refers to a taxon above).         -->
    <!-- ntax=6 nchar=768                                                        -->
    <alignment id="alignment" dataType="nucleotide">
        <sequence>
            <taxon idref="human"/>
            AGAAATATGTCTGATAAAAGAGTTACTTTGATAGAGTAAATAATAGGAGCTTAAACCCCCTTATTTCTACTAGGACTATGAGAATCGAACCCATCCCTGAGAATCCAAAATTCTCCGTGCCACCTATCACACCCCATCCTAAGTAAGGTCAGCTAAATAAGCTATCGGGCCCATACCCCGAAAATGTTGGTTATACCCTTCCCGTACTAAGAAATTTAGGTTAAATACAGACCAAGAGCCTTCAAAGCCCTCAGTAAGTTG-CAATACTTAATTTCTGTAAGGACTGCAAAACCCCACTCTGCATCAACTGAACGCAAATCAGCCACTTTAATTAAGCTAAGCCCTTCTAGACCAATGGGACTTAAACCCACAAACACTTAGTTAACAGCTAAGCACCCTAATCAAC-TGGCTTCAATCTAAAGCCCCGGCAGG-TTTGAAGCTGCTTCTTCGAATTTGCAATTCAATATGAAAA-TCACCTCGGAGCTTGGTAAAAAGAGGCCTAACCCCTGTCTTTAGATTTACAGTCCAATGCTTCA-CTCAGCCATTTTACCACAAAAAAGGAAGGAATCGAACCCCCCAAAGCTGGTTTCAAGCCAACCCCATGGCCTCCATGACTTTTTCAAAAGGTATTAGAAAAACCATTTCATAACTTTGTCAAAGTTAAATTATAGGCT-AAATCCTATATATCTTA-CACTGTAAAGCTAACTTAGCATTAACCTTTTAAGTTAAAGATTAAGAGAACCAACACCTCTTTACAGTGA
        </sequence>
        <sequence>
            <taxon idref="chimp"/>
            AGAAATATGTCTGATAAAAGAATTACTTTGATAGAGTAAATAATAGGAGTTCAAATCCCCTTATTTCTACTAGGACTATAAGAATCGAACTCATCCCTGAGAATCCAAAATTCTCCGTGCCACCTATCACACCCCATCCTAAGTAAGGTCAGCTAAATAAGCTATCGGGCCCATACCCCGAAAATGTTGGTTACACCCTTCCCGTACTAAGAAATTTAGGTTAAGCACAGACCAAGAGCCTTCAAAGCCCTCAGCAAGTTA-CAATACTTAATTTCTGTAAGGACTGCAAAACCCCACTCTGCATCAACTGAACGCAAATCAGCCACTTTAATTAAGCTAAGCCCTTCTAGATTAATGGGACTTAAACCCACAAACATTTAGTTAACAGCTAAACACCCTAATCAAC-TGGCTTCAATCTAAAGCCCCGGCAGG-TTTGAAGCTGCTTCTTCGAATTTGCAATTCAATATGAAAA-TCACCTCAGAGCTTGGTAAAAAGAGGCTTAACCCCTGTCTTTAGATTTACAGTCCAATGCTTCA-CTCAGCCATTTTACCACAAAAAAGGAAGGAATCGAACCCCCTAAAGCTGGTTTCAAGCCAACCCCATGACCTCCATGACTTTTTCAAAAGATATTAGAAAAACTATTTCATAACTTTGTCAAAGTTAAATTACAGGTT-AACCCCCGTATATCTTA-CACTGTAAAGCTAACCTAGCATTAACCTTTTAAGTTAAAGATTAAGAGGACCGACACCTCTTTACAGTGA
        </sequence>
        <sequence>
            <taxon idref="bonobo"/>
            AGAAATATGTCTGATAAAAGAATTACTTTGATAGAGTAAATAATAGGAGTTTAAATCCCCTTATTTCTACTAGGACTATGAGAGTCGAACCCATCCCTGAGAATCCAAAATTCTCCGTGCCACCTATCACACCCCATCCTAAGTAAGGTCAGCTAAATAAGCTATCGGGCCCATACCCCGAAAATGTTGGTTATACCCTTCCCGTACTAAGAAATTTAGGTTAAACACAGACCAAGAGCCTTCAAAGCTCTCAGTAAGTTA-CAATACTTAATTTCTGTAAGGACTGCAAAACCCCACTCTGCATCAACTGAACGCAAATCAGCCACTTTAATTAAGCTAAGCCCTTCTAGATTAATGGGACTTAAACCCACAAACATTTAGTTAACAGCTAAACACCCTAATCAGC-TGGCTTCAATCTAAAGCCCCGGCAGG-TTTGAAGCTGCTTCTTTGAATTTGCAATTCAATATGAAAA-TCACCTCAGAGCTTGGTAAAAAGAGGCTTAACCCCTGTCTTTAGATTTACAGTCCAATGCTTCA-CTCAGCCATTTTACCACAAAAAAGGAAGGAATCGAACCCCCTAAAGCTGGTTTCAAGCCAACCCCATGACCCCCATGACTTTTTCAAAAGATATTAGAAAAACTATTTCATAACTTTGTCAAAGTTAAATTACAGGTT-AAACCCCGTATATCTTA-CACTGTAAAGCTAACCTAGCATTAACCTTTTAAGTTAAAGATTAAGAGGACCAACACCTCTTTACAGTGA
        </sequence>
        <sequence>
            <taxon idref="gorilla"/>
            AGAAATATGTCTGATAAAAGAGTTACTTTGATAGAGTAAATAATAGAGGTTTAAACCCCCTTATTTCTACTAGGACTATGAGAATTGAACCCATCCCTGAGAATCCAAAATTCTCCGTGCCACCTGTCACACCCCATCCTAAGTAAGGTCAGCTAAATAAGCTATCGGGCCCATACCCCGAAAATGTTGGTCACATCCTTCCCGTACTAAGAAATTTAGGTTAAACATAGACCAAGAGCCTTCAAAGCCCTTAGTAAGTTA-CAACACTTAATTTCTGTAAGGACTGCAAAACCCTACTCTGCATCAACTGAACGCAAATCAGCCACTTTAATTAAGCTAAGCCCTTCTAGATCAATGGGACTCAAACCCACAAACATTTAGTTAACAGCTAAACACCCTAGTCAAC-TGGCTTCAATCTAAAGCCCCGGCAGG-TTTGAAGCTGCTTCTTCGAATTTGCAATTCAATATGAAAT-TCACCTCGGAGCTTGGTAAAAAGAGGCCCAGCCTCTGTCTTTAGATTTACAGTCCAATGCCTTA-CTCAGCCATTTTACCACAAAAAAGGAAGGAATCGAACCCCCCAAAGCTGGTTTCAAGCCAACCCCATGACCTTCATGACTTTTTCAAAAGATATTAGAAAAACTATTTCATAACTTTGTCAAGGTTAAATTACGGGTT-AAACCCCGTATATCTTA-CACTGTAAAGCTAACCTAGCGTTAACCTTTTAAGTTAAAGATTAAGAGTATCGGCACCTCTTTGCAGTGA
        </sequence>
        <sequence>
            <taxon idref="orangutan"/>
            AGAAATATGTCTGACAAAAGAGTTACTTTGATAGAGTAAAAAATAGAGGTCTAAATCCCCTTATTTCTACTAGGACTATGGGAATTGAACCCACCCCTGAGAATCCAAAATTCTCCGTGCCACCCATCACACCCCATCCTAAGTAAGGTCAGCTAAATAAGCTATCGGGCCCATACCCCGAAAATGTTGGTTACACCCTTCCCGTACTAAGAAATTTAGGTTA--CACAGACCAAGAGCCTTCAAAGCCCTCAGCAAGTCA-CAGCACTTAATTTCTGTAAGGACTGCAAAACCCCACTTTGCATCAACTGAGCGCAAATCAGCCACTTTAATTAAGCTAAGCCCTCCTAGACCGATGGGACTTAAACCCACAAACATTTAGTTAACAGCTAAACACCCTAGTCAAT-TGGCTTCAGTCCAAAGCCCCGGCAGGCCTTAAAGCTGCTCCTTCGAATTTGCAATTCAACATGACAA-TCACCTCAGGGCTTGGTAAAAAGAGGTCTGACCCCTGTTCTTAGATTTACAGCCTAATGCCTTAACTCGGCCATTTTACCGCAAAAAAGGAAGGAATCGAACCTCCTAAAGCTGGTTTCAAGCCAACCCCATAACCCCCATGACTTTTTCAAAAGGTACTAGAAAAACCATTTCGTAACTTTGTCAAAGTTAAATTACAGGTC-AGACCCTGTGTATCTTA-CATTGCAAAGCTAACCTAGCATTAACCTTTTAAGTTAAAGACTAAGAGAACCAGCCTCTCTTTGCAATGA
        </sequence>
        <sequence>
            <taxon idref="siamang"/>
            AGAAATACGTCTGACGAAAGAGTTACTTTGATAGAGTAAATAACAGGGGTTTAAATCCCCTTATTTCTACTAGAACCATAGGAGTCGAACCCATCCTTGAGAATCCAAAACTCTCCGTGCCACCCGTCGCACCCTGTTCTAAGTAAGGTCAGCTAAATAAGCTATCGGGCCCATACCCCGAAAATGTTGGTTATACCCTTCCCATACTAAGAAATTTAGGTTAAACACAGACCAAGAGCCTTCAAAGCCCTCAGTAAGTTAACAAAACTTAATTTCTGCAAGGGCTGCAAAACCCTACTTTGCATCAACCGAACGCAAATCAGCCACTTTAATTAAGCTAAGCCCTTCTAGATCGATGGGACTTAAACCCATAAAAATTTAGTTAACAGCTAAACACCCTAAACAACCTGGCTTCAATCTAAAGCCCCGGCAGA-GTTGAAGCTGCTTCTTTGAACTTGCAATTCAACGTGAAAAATCACTTCGGAGCTTGGCAAAAAGAGGTTTCACCTCTGTCCTTAGATTTACAGTCTAATGCTTTA-CTCAGCCACTTTACCACAAAAAAGGAAGGAATCGAACCCTCTAAAACCGGTTTCAAGCCAGCCCCATAACCTTTATGACTTTTTCAAAAGATATTAGAAAAACTATTTCATAACTTTGTCAAAGTTAAATCACAGGTCCAAACCCCGTATATCTTATCACTGTAGAGCTAGACCAGCATTAACCTTTTAAGTTAAAGACTAAGAGAACTACCGCCTCTTTACAGTGA
        </sequence>
    </alignment>

    <!-- The unique patterns for all positions                                   -->
    <!-- npatterns=69                                                            -->
    <patterns id="patterns" from="1">
        <alignment idref="alignment"/>
    </patterns>

    <!-- This is a simple constant population size coalescent model              -->
    <!-- that is used to generate an initial tree for the chain.                 -->
    <constantSize id="initialDemo" units="substitutions">
        <populationSize>
            <parameter id="initialDemo.popSize" value="100.0"/>
        </populationSize>
    </constantSize>

    <!-- A prior on the distribution node heights defined given                  -->
    <!-- a Birth-Death speciation process (Yang & Rannala, 1997).                -->
    <birthDeathModel id="birthDeath" units="substitutions">
        <birthRate>
            <parameter id="birthDeath.birthRate" value="1.0" lower="0.0" upper="1000000.0"/>
        </birthRate>
        <deathRate>
            <parameter id="birthDeath.deathRate" value="0.0" lower="0.0" upper="1000000.0"/>
        </deathRate>
        <samplingProportion>
            <parameter id="birthDeath.samplingProportion" value="1.0"/>
        </samplingProportion>
    </birthDeathModel>

    <!-- Generate a random starting tree under the coalescent process            -->
    <coalescentTree id="startingTree">
        <taxa idref="taxa"/>
        <constantSize idref="initialDemo"/>
    </coalescentTree>

    <treeModel id="treeModel">
        <coalescentTree idref="startingTree"/>
        <rootHeight>
            <parameter id="treeModel.rootHeight"/>
        </rootHeight>
        <nodeHeights internalNodes="true">
            <parameter id="treeModel.internalNodeHeights"/>
        </nodeHeights>
        <nodeHeights internalNodes="true" rootNode="true">
            <parameter id="treeModel.allInternalNodeHeights"/>
        </nodeHeights>
    </treeModel>

    <speciationLikelihood id="speciation">
        <model>
            <birthDeathModel idref="birthDeath"/>
        </model>
        <speciesTree>
            <treeModel idref="treeModel"/>
        </speciesTree>
    </speciationLikelihood>

    <!-- The strict clock (Uniform rates across branches)                        -->
    <strictClockBranchRates id="branchRates">
        <rate>
            <parameter id="clock.rate" value="4e-3"/>
        </rate>
    </strictClockBranchRates>

    <!-- The HKY substitution model (Hasegawa, Kishino & Yano, 1985)             -->
    <hkyModel id="hky">
        <frequencies>
            <frequencyModel dataType="nucleotide">
                <alignment idref="alignment"/>
                <frequencies>
                    <parameter id="hky.frequencies" dimension="4"/>
                </frequencies>
            </frequencyModel>
        </frequencies>
        <kappa>
            <parameter id="hky.kappa" value="1.0" lower="0.0" upper="100.0"/>
        </kappa>
    </hkyModel>

    <!-- site model                                                              -->
    <siteModel id="siteModel">
        <substitutionModel>
            <hkyModel idref="hky"/>
        </substitutionModel>
    </siteModel>

    <treeLikelihood id="treeLikelihood">
        <patterns idref="patterns"/>
        <treeModel idref="treeModel"/>
        <siteModel idref="siteModel"/>
        <strictClockBranchRates idref="branchRates"/>
    </treeLikelihood>

    <operators id="operators">
        <scaleOperator scaleFactor="0.75" weight="1">
            <parameter idref="hky.kappa"/>
        </scaleOperator>
        <scaleOperator scaleFactor="0.75" weight="3">
            <parameter idref="birthDeath.birthRate"/>
        </scaleOperator>
        <!--
		<scaleOperator scaleFactor="0.75" weight="3">
			<parameter idref="birthDeath.deathRate"/>
		</scaleOperator>
		-->
        <scaleOperator scaleFactor="0.75" weight="3">
            <parameter idref="treeModel.rootHeight"/>
        </scaleOperator>
        <uniformOperator weight="30">
            <parameter idref="treeModel.internalNodeHeights"/>
        </uniformOperator>
        <subtreeSlide size="0.0154" gaussian="true" weight="15">
            <treeModel idref="treeModel"/>
        </subtreeSlide>
        <narrowExchange weight="15">
            <treeModel idref="treeModel"/>
        </narrowExchange>
        <wideExchange weight="3">
            <treeModel idref="treeModel"/>
        </wideExchange>
        <wilsonBalding weight="3">
            <treeModel idref="treeModel"/>
        </wilsonBalding>
    </operators>

    <mcmc id="mcmc" chainLength="1000000" autoOptimize="true" preBurnin="0">
        <posterior id="posterior">
            <prior id="prior">
                <speciationLikelihood idref="speciation"/>
                <exponentialPrior mean="50" offset="0.0">
                    <parameter idref="treeModel.rootHeight"/>
                </exponentialPrior>
            </prior>
            <likelihood id="likelihood">
                <treeLikelihood idref="treeLikelihood"/>
            </likelihood>
        </posterior>
        <operators idref="operators"/>
        <log id="screenLog" logEvery="1000">
            <column label="Posterior" dp="4" width="12">
                <posterior idref="posterior"/>
            </column>
            <column label="Root Height" sf="6" width="12">
                <parameter idref="treeModel.rootHeight"/>
            </column>
            <column label="L(tree)" dp="4" width="12">
                <treeLikelihood idref="treeLikelihood"/>
            </column>
            <column label="L(speciation)" dp="4" width="12">
                <speciationLikelihood idref="speciation"/>
            </column>
        </log>
        <log id="fileLog" logEvery="1000" fileName="testBirthDeath.log">
            <posterior idref="posterior"/>
            <parameter idref="birthDeath.birthRate"/>
            <parameter idref="birthDeath.deathRate"/>
            <parameter idref="hky.kappa"/>
            <parameter idref="treeModel.rootHeight"/>
            <treeLikelihood idref="treeLikelihood"/>
            <speciationLikelihood idref="speciation"/>
        </log>
        <logTree id="treeFileLog" logEvery="1000" nexusFormat="true" fileName="testBirthDeath.trees">
            <treeModel idref="treeModel"/>
            <posterior idref="posterior"/>
        </logTree>
    </mcmc>

    <report>
        <property name="timer">
            <object idref="mcmc"/>
        </property>
    </report>

</beast>
