| 1 |
<?xml version="1.0" standalone="yes"?> |
| 2 |
|
| 3 |
<!-- Generated by BEAUTi v1.8.0 Prerelease r5934 --> |
| 4 |
<!-- by Alexei J. Drummond, Andrew Rambaut and Marc A. Suchard --> |
| 5 |
<!-- Department of Computer Science, University of Auckland and --> |
| 6 |
<!-- Institute of Evolutionary Biology, University of Edinburgh --> |
| 7 |
<!-- David Geffen School of Medicine, University of California, Los Angeles--> |
| 8 |
<!-- http://beast.bio.ed.ac.uk/ --> |
| 9 |
<beast> |
| 10 |
|
| 11 |
<!-- The list of taxa to be analysed (can also include dates/ages). --> |
| 12 |
<!-- ntax=${taxon_count} --> |
| 13 |
<taxa id="taxa"> |
| 14 |
<#list taxa as taxon> |
| 15 |
<taxon id="${taxon.id}"> |
| 16 |
<date value="${taxon.date}" direction="forwards" units="years"/> |
| 17 |
</taxon> |
| 18 |
</#list> |
| 19 |
</taxa> |
| 20 |
|
| 21 |
<!-- The sequence alignment (each sequence refers to a taxon above). --> |
| 22 |
<!-- ntax=${taxon_count} nchar=${site_count} --> |
| 23 |
<alignment id="${alignment.id}" dataType="nucleotide"> |
| 24 |
<#list alignment.sequences as sequence> |
| 25 |
<sequence> |
| 26 |
<taxon idref="${sequence.taxon.id}"/> |
| 27 |
${sequence.data} |
| 28 |
</sequence> |
| 29 |
</#list> |
| 30 |
</alignment> |
| 31 |
|
| 32 |
<!-- The unique patterns from 1 to end --> |
| 33 |
<patterns id="patterns" from="1" strip="false"> |
| 34 |
<alignment idref="alignment"/> |
| 35 |
</patterns> |
| 36 |
|
| 37 |
<!-- A prior assumption that the population size has remained constant --> |
| 38 |
<!-- throughout the time spanned by the genealogy. --> |
| 39 |
<constantSize id="constant" units="years"> |
| 40 |
<populationSize> |
| 41 |
<parameter id="constant.popSize" value="1.0" lower="0.0"/> |
| 42 |
</populationSize> |
| 43 |
</constantSize> |
| 44 |
|
| 45 |
<!-- Generate a random starting tree under the coalescent process --> |
| 46 |
<coalescentSimulator id="startingTree"> |
| 47 |
<taxa idref="taxa"/> |
| 48 |
<constantSize idref="constant"/> |
| 49 |
</coalescentSimulator> |
| 50 |
|
| 51 |
<!-- Generate a tree model --> |
| 52 |
<treeModel id="treeModel"> |
| 53 |
<coalescentTree idref="startingTree"/> |
| 54 |
<rootHeight> |
| 55 |
<parameter id="treeModel.rootHeight"/> |
| 56 |
</rootHeight> |
| 57 |
<nodeHeights internalNodes="true"> |
| 58 |
<parameter id="treeModel.internalNodeHeights"/> |
| 59 |
</nodeHeights> |
| 60 |
<nodeHeights internalNodes="true" rootNode="true"> |
| 61 |
<parameter id="treeModel.allInternalNodeHeights"/> |
| 62 |
</nodeHeights> |
| 63 |
</treeModel> |
| 64 |
|
| 65 |
<!-- Generate a coalescent likelihood --> |
| 66 |
<coalescentLikelihood id="coalescent"> |
| 67 |
<model> |
| 68 |
<constantSize idref="constant"/> |
| 69 |
</model> |
| 70 |
<populationTree> |
| 71 |
<treeModel idref="treeModel"/> |
| 72 |
</populationTree> |
| 73 |
</coalescentLikelihood> |
| 74 |
|
| 75 |
<!-- The strict clock (Uniform rates across branches) --> |
| 76 |
<strictClockBranchRates id="branchRates"> |
| 77 |
<rate> |
| 78 |
<parameter id="clock.rate" value="1.0E-4" lower="0.0"/> |
| 79 |
</rate> |
| 80 |
</strictClockBranchRates> |
| 81 |
|
| 82 |
<!-- The HKY substitution model (Hasegawa, Kishino & Yano, 1985) --> |
| 83 |
<HKYModel id="hky"> |
| 84 |
<frequencies> |
| 85 |
<frequencyModel dataType="nucleotide"> |
| 86 |
<frequencies> |
| 87 |
<parameter id="frequencies" value="0.25 0.25 0.25 0.25"/> |
| 88 |
</frequencies> |
| 89 |
</frequencyModel> |
| 90 |
</frequencies> |
| 91 |
<kappa> |
| 92 |
<parameter id="kappa" value="2.0" lower="0.0"/> |
| 93 |
</kappa> |
| 94 |
</HKYModel> |
| 95 |
|
| 96 |
<!-- site model --> |
| 97 |
<siteModel id="siteModel"> |
| 98 |
<substitutionModel> |
| 99 |
<HKYModel idref="hky"/> |
| 100 |
</substitutionModel> |
| 101 |
</siteModel> |
| 102 |
|
| 103 |
<!-- Likelihood for tree given sequence data --> |
| 104 |
<treeLikelihood id="treeLikelihood" useAmbiguities="false"> |
| 105 |
<patterns idref="patterns"/> |
| 106 |
<treeModel idref="treeModel"/> |
| 107 |
<siteModel idref="siteModel"/> |
| 108 |
<strictClockBranchRates idref="branchRates"/> |
| 109 |
</treeLikelihood> |
| 110 |
|
| 111 |
<!-- Define operators --> |
| 112 |
<operators id="operators" optimizationSchedule="default"> |
| 113 |
<scaleOperator scaleFactor="0.75" weight="0.1"> |
| 114 |
<parameter idref="kappa"/> |
| 115 |
</scaleOperator> |
| 116 |
<deltaExchange delta="0.01" weight="0.1"> |
| 117 |
<parameter idref="frequencies"/> |
| 118 |
</deltaExchange> |
| 119 |
<scaleOperator scaleFactor="0.75" weight="3"> |
| 120 |
<parameter idref="clock.rate"/> |
| 121 |
</scaleOperator> |
| 122 |
<subtreeSlide size="38.0" gaussian="true" weight="15"> |
| 123 |
<treeModel idref="treeModel"/> |
| 124 |
</subtreeSlide> |
| 125 |
<narrowExchange weight="15"> |
| 126 |
<treeModel idref="treeModel"/> |
| 127 |
</narrowExchange> |
| 128 |
<wideExchange weight="3"> |
| 129 |
<treeModel idref="treeModel"/> |
| 130 |
</wideExchange> |
| 131 |
<wilsonBalding weight="3"> |
| 132 |
<treeModel idref="treeModel"/> |
| 133 |
</wilsonBalding> |
| 134 |
<scaleOperator scaleFactor="0.75" weight="3"> |
| 135 |
<parameter idref="treeModel.rootHeight"/> |
| 136 |
</scaleOperator> |
| 137 |
<uniformOperator weight="30"> |
| 138 |
<parameter idref="treeModel.internalNodeHeights"/> |
| 139 |
</uniformOperator> |
| 140 |
<scaleOperator scaleFactor="0.75" weight="3"> |
| 141 |
<parameter idref="constant.popSize"/> |
| 142 |
</scaleOperator> |
| 143 |
<upDownOperator scaleFactor="0.75" weight="3"> |
| 144 |
<up> |
| 145 |
<parameter idref="clock.rate"/> |
| 146 |
</up> |
| 147 |
<down> |
| 148 |
<parameter idref="treeModel.allInternalNodeHeights"/> |
| 149 |
</down> |
| 150 |
</upDownOperator> |
| 151 |
</operators> |
| 152 |
|
| 153 |
<!-- Define MCMC --> |
| 154 |
<mcmc id="mcmc" chainLength="${chain_length}" autoOptimize="true" operatorAnalysis="${filename_stem}.ops"> |
| 155 |
<posterior id="posterior"> |
| 156 |
<prior id="prior"> |
| 157 |
<logNormalPrior mean="1.0" stdev="1.25" offset="0.0" meanInRealSpace="false"> |
| 158 |
<parameter idref="kappa"/> |
| 159 |
</logNormalPrior> |
| 160 |
<uniformPrior lower="0.0" upper="1.0"> |
| 161 |
<parameter idref="frequencies"/> |
| 162 |
</uniformPrior> |
| 163 |
<ctmcScalePrior> |
| 164 |
<ctmcScale> |
| 165 |
<parameter idref="clock.rate"/> |
| 166 |
</ctmcScale> |
| 167 |
<treeModel idref="treeModel"/> |
| 168 |
</ctmcScalePrior> |
| 169 |
<oneOnXPrior> |
| 170 |
<parameter idref="constant.popSize"/> |
| 171 |
</oneOnXPrior> |
| 172 |
<coalescentLikelihood idref="coalescent"/> |
| 173 |
</prior> |
| 174 |
<likelihood id="likelihood"> |
| 175 |
<treeLikelihood idref="treeLikelihood"/> |
| 176 |
</likelihood> |
| 177 |
</posterior> |
| 178 |
<operators idref="operators"/> |
| 179 |
|
| 180 |
<!-- write log to screen --> |
| 181 |
<log id="screenLog" logEvery="${log_every}"> |
| 182 |
<column label="Posterior" dp="4" width="12"> |
| 183 |
<posterior idref="posterior"/> |
| 184 |
</column> |
| 185 |
<column label="Prior" dp="4" width="12"> |
| 186 |
<prior idref="prior"/> |
| 187 |
</column> |
| 188 |
<column label="Likelihood" dp="4" width="12"> |
| 189 |
<likelihood idref="likelihood"/> |
| 190 |
</column> |
| 191 |
<column label="rootHeight" sf="6" width="12"> |
| 192 |
<parameter idref="treeModel.rootHeight"/> |
| 193 |
</column> |
| 194 |
<column label="clock.rate" sf="6" width="12"> |
| 195 |
<parameter idref="clock.rate"/> |
| 196 |
</column> |
| 197 |
</log> |
| 198 |
|
| 199 |
<!-- write log to file --> |
| 200 |
<log id="fileLog" logEvery="${log_every}" fileName="${filename_stem}.log" overwrite="false"> |
| 201 |
<posterior idref="posterior"/> |
| 202 |
<prior idref="prior"/> |
| 203 |
<likelihood idref="likelihood"/> |
| 204 |
<parameter idref="treeModel.rootHeight"/> |
| 205 |
<parameter idref="constant.popSize"/> |
| 206 |
<parameter idref="kappa"/> |
| 207 |
<parameter idref="frequencies"/> |
| 208 |
<parameter idref="clock.rate"/> |
| 209 |
<treeLikelihood idref="treeLikelihood"/> |
| 210 |
<coalescentLikelihood idref="coalescent"/> |
| 211 |
</log> |
| 212 |
|
| 213 |
<!-- write tree log to file --> |
| 214 |
<logTree id="treeFileLog" logEvery="${log_every}" nexusFormat="true" fileName="${filename_stem}.trees" sortTranslationTable="true"> |
| 215 |
<treeModel idref="treeModel"/> |
| 216 |
<trait name="rate" tag="rate"> |
| 217 |
<strictClockBranchRates idref="branchRates"/> |
| 218 |
</trait> |
| 219 |
<posterior idref="posterior"/> |
| 220 |
</logTree> |
| 221 |
</mcmc> |
| 222 |
<report> |
| 223 |
<property name="timer"> |
| 224 |
<mcmc idref="mcmc"/> |
| 225 |
</property> |
| 226 |
</report> |
| 227 |
</beast> |