<?xml version="1.0" standalone="yes"?>
<!-- $Id: testLikelihood.xml,v 1.2 2005/07/11 23:22:40 rambaut Exp $ -->
<!-- Tests the tree likelihood -->

<beast>

	<!-- The list of taxa analyse (can also include dates/ages).                 -->
	<!-- ntax=6                                                                  -->
	<taxa id="taxa1">
		<taxon id="Human_Horai"/>
		<taxon id="Human_Arnason"/>
		<taxon id="Chimp_Horai"/>
		<taxon id="Chimp_Arnason"/>
		<taxon id="Gorilla_Horai"/>
		<taxon id="Gorilla_Arnason"/>
	</taxa>

	<!-- The sequence alignment (each sequence refers to a taxon above).         -->
	<!-- ntax=6 nchar=768                                                        -->
	<alignment id="alignment1" dataType="nucleotide">
		<sequence>
			<taxon idref="Human_Horai"/>
[encoded data, 12638 characters]
          CTCATCCTAACCCTACTCCTAATCACA
            </sequence>
        <sequence>
    <taxon idref="Human_Arnason"/>
[encoded data, 12638 characters]
          CTCATCCTAACCCTACTCCTAATCACA
        </sequence>
        <sequence>
            <taxon idref="Chimp_Horai"/>
[encoded data, 12638 characters]
          CTCATCTTAACCTTACTCCTAATCACA
        </sequence>
        <sequence>
            <taxon idref="Chimp_Arnason"/>
[encoded data, 12638 characters]
          CTCATCTTAACCTTACTCCTAATCACA
        </sequence>
        <sequence>
            <taxon idref="Gorilla_Horai"/>
[encoded data, 12638 characters]
          CTTCTTTTAATCCTTCTTCTAATCACA
        </sequence>
        <sequence>
            <taxon idref="Gorilla_Arnason"/>
[encoded data, 12638 characters]
          CTTCTTATAATCCTTCTTCTAATCACA
		</sequence>
	</alignment>



    <convert id="codonAlignment" dataType="codon" geneticCode="universal">
        <alignment idref="alignment1"/>
    </convert>

	<patterns id="patterns1" from="1">
		<alignment idref="codonAlignment"/>
	</patterns>

    <newick id="treeML">
        ((Human_Horai: 0.008514, Human_Arnason: 0.008514): 0.175775, (Chimp_Horai: 0.002462, Chimp_Arnason: 0.002462): 0.181828, (Gorilla_Horai: 0.004522, Gorilla_Arnason: 0.004522): 0.179768);
    </newick>

	<treeModel id="treeModel1">
		<tree idref="treeML"/>
		<rootHeight>
			<parameter id="treeModel1.rootHeight"/>
		</rootHeight>
		<nodeHeights internalNodes="true">
			<parameter id="treeModel1.internalNodeHeights"/>
		</nodeHeights>
		<nodeHeights internalNodes="true" rootNode="true">
			<parameter id="treeModel1.allInternalNodeHeights"/>
		</nodeHeights>
	</treeModel>


    <report>
        Newick Tree: <tree idref="treeML"/>
    </report>

     <yangCodonModel id="yang" geneticCode="universal">
        <omega>
            <parameter id="omega" value="1.414"/>
        </omega>
        <kappa>
            <parameter id="kappa" value="1.234567"/>
        </kappa>
        <frequencyModel id="freqmodel" dataType="codon-universal">
            <alignment idref="codonAlignment"/>
            <frequencies>
                <parameter id="codonfrequencies" dimension="61"/>
            </frequencies>
        </frequencyModel>
    </yangCodonModel>

	<siteModel id="siteModel1">
		<substitutionModel>
			<yangCodonModel idref="yang"/>
		</substitutionModel>
		<mutationRate>
			<parameter id="siteModel1.mu" value="1.0" lower="0.0"/>
		</mutationRate>
	</siteModel>

	<treeLikelihood id="treeLikelihood1">
		<patterns idref="patterns1"/>
		<treeModel idref="treeModel1"/>
		<siteModel idref="siteModel1"/>
	</treeLikelihood>

	<report>
		Yang Vertebrates:
		ln L = <likelihood idref="treeLikelihood1"/>
		(codonml = -XXXX.XX)
	</report>
    
</beast>
