Skip to content

Instantly share code, notes, and snippets.

@tgvaughan
Created June 19, 2015 04:54
Show Gist options
  • Save tgvaughan/21bed31f550544b2e565 to your computer and use it in GitHub Desktop.
Save tgvaughan/21bed31f550544b2e565 to your computer and use it in GitHub Desktop.
Stripped-down BEAUti template
<beast version='2.0'
namespace='beast.app.beauti:beast.core:beast.evolution.branchratemodel:beast.evolution.speciation:beast.evolution.tree.coalescent:beast.core.util:beast.evolution.nuc:beast.evolution.operators:beast.evolution.sitemodel:beast.evolution.substitutionmodel:beast.evolution.likelihood:beast.evolution:beast.math.distributions'
templateinfo='template for structured coalescent analyses'>
<map name='connect' reserved='true'>beast.app.beauti.BeautiConnector</map>
<map name='subtemplate' reserved='true'>beast.app.beauti.BeautiSubTemplate</map>
<beauticonfig spec='BeautiConfig'>
<panel spec='BeautiPanelConfig' panelname="Partitions" tiptext="Data Partitions"
path='distribution/distribution[id="likelihood"]/distribution/data'
hasPartitions="none" icon='2220.png.x' forceExpansion='FALSE'
type='beast.evolution.alignment.Alignment'
/>
<panel spec='BeautiPanelConfig' panelname="Site Model" tiptext="Site model and substitution model specifications"
path='siteModel'
hasPartitions="SiteModel" icon='3.png.x' forceExpansion='TRUE'
/>
<panel spec='BeautiPanelConfig' panelname="MCMC" tiptext="MCMC parameters"
path=''
hasPartitions="none" icon='9.png.x' forceExpansion='TRUE'
/>
<alignmentProvider id="Add Alignment" spec='BeautiAlignmentProvider' template='@StandardPartitionTemplate'/>
<partitiontemplate id='StandardPartitionTemplate' spec='BeautiSubTemplate' class='beast.evolution.likelihood.TreeLikelihood' mainid='mcmc'>
<![CDATA[
<!-- site model -->
<plugin spec='SiteModel' id="SiteModel.s:$(n)" gammaCategoryCount='0'>
<!--substModel will be automatically detected /-->
<substModel spec='JukesCantor'/>
<proportionInvariant spec='parameter.RealParameter' id='proportionInvariant.s:$(n)' value='0.0' lower='0' upper='1' estimate='false'/>
<mutationRate spec='parameter.RealParameter' id='mutationRate.s:$(n)' value='1.0' estimate='false'/>
<shape spec='parameter.RealParameter' id='gammaShape.s:$(n)' value='1.0' estimate='false'/>
</plugin>
<plugin spec='TreeLikelihood' id="treeLikelihood.$(n)">
<data idref="data"/>
<tree idref="Tree.t:$(n)"/>
<siteModel idref="SiteModel.s:$(n)"/>
<branchRateModel spec='StrictClockModel' id='StrictClock.c:$(n)'>
<clock.rate id='clockRate.c:$(n)' spec='parameter.RealParameter' value='1.0' estimate='false'/>
</branchRateModel>
</plugin>
<!-- tree and its properties -->
<plugin spec='beast.evolution.tree.RandomTree' id='Tree.t:$(n)' estimate='true'>
<taxa spec='Alignment' idref='data'/>
<populationModel id='ConstantPopulation0.t:$(n)' spec='ConstantPopulation'>
<popSize id='randomPopSize.t:$(n)' spec='parameter.RealParameter' value='1'/>
</populationModel>
</plugin>
]]>
<connect srcID='treeLikelihood.$(n)' targetID='likelihood' inputName='distribution' if="isInitializing"/>
<connect method="beast.app.beauti.SiteModelInputEditor.customConnector"/>
<connect srcID='Tree.t:$(n)' targetID='mcmc' inputName='init' if='inposterior(Tree.t:$(n))'/>
<connect srcID='Tree.t:$(n)' targetID='state' inputName='stateNode' if='inposterior(Tree.t:$(n))'/>
</partitiontemplate>
</beauticonfig>
<!--
<operator spec='DeltaExchangeOperator' id='FixMeanRatesOperator' weight='2' delta='0.75'/>
-->
<!-- framework for main model -->
<run spec="MCMC" id="mcmc" chainLength="10000000">
<state storeEvery='5000' id='state'>
</state>
<distribution spec="CompoundDistribution" id="posterior">
<distribution spec="CompoundDistribution" id="prior">
</distribution>
<distribution spec="CompoundDistribution" id="likelihood">
</distribution>
</distribution>
<logger id='tracelog' logEvery="1000" fileName="$(filebase).log">
<log idref="posterior"/>
<log idref="likelihood"/>
<log idref="prior"/>
</logger>
<logger id='screenlog' logEvery="1000">
<!--model idref='posterior'/-->
<log idref="posterior"/>
<ESS spec='ESS' name='log' arg="@posterior"/>
<log idref="likelihood"/>
<log idref="prior"/>
</logger>
</run>
</beast>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment