Skip to content

Commit

Permalink
Update templates for BEAST 2.3 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
denisekuehnert committed Jun 1, 2015
1 parent bfe431a commit d8274aa
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 13 deletions.
4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<property name="libBeast2" location="${beast2path}/lib" />
<property name="srcBeast2" location="${beast2path}/src" />
<property name="beast2classpath" location="${beast2path}/build" />
<property name="beastiiclasspath" location="../beastii/build" />
<property name="beastlabsclasspath" location="../BEASTLabs/build" />
<property name="bdskyclasspath" location="../bdsky/build" />
<property name="masterclasspath" location="../MASTER/build" />
<property name="Add_on_dir" value="${release_dir}/add-on" />
Expand All @@ -35,7 +35,7 @@
<fileset dir="${libBeast2}" includes="beagle.jar"/>
<fileset dir="${libBeast2}" includes="commons-math3-3.1.1.jar"/>
<pathelement path="${beast2classpath}"/>
<pathelement path="${beastiiclasspath}"/>
<pathelement path="${beastlabsclasspath}"/>
<pathelement path="${bdskyclasspath}"/>
<pathelement path="${masterclasspath}"/>
</path>
Expand Down
5 changes: 3 additions & 2 deletions examples/BDSIR_contemp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
<parameter id="kappa.s:3" lower="0.0" name="stateNode">2.0</parameter>
<parameter id="originEc.t:3" lower="0.0" name="stateNode" upper="1000.0">10.0</parameter>
<parameter id="rhoEc.t:3" lower="0.0" name="stateNode" upper="1.0">0.1</parameter>
<parameter id="samplingEc.t:3" lower="0.0" name="stateNode" upper="1.0">0.0</parameter>
<parameter id="becomeUninfectiousRateEc.t:3" lower="0.0" name="stateNode" upper="10.0">1.0</parameter>
<parameter id="R0Ec.t:3" lower="0.0" name="stateNode" upper="10.0">2.0</parameter>
<parameter id="S0Ec.t:3" lower="0.0" name="stateNode" upper="1.0E7">300000.0</parameter>
Expand All @@ -47,7 +46,9 @@

<distribution id="posterior" spec="util.CompoundDistribution">
<distribution id="prior" spec="util.CompoundDistribution">
<distribution R0="@R0Ec.t:3" S0="@S0Ec.t:3" becomeUninfectiousRate="@becomeUninfectiousRateEc.t:3" contemp="true" dR="@dR.t:3" dS="@dS.t:3" id="BDSIRcontemp.t:3" origin="@originEc.t:3" rho="@rhoEc.t:3" samplingProportion="@samplingEc.t:3" spec="beast.phylodynamics.BDSIR" tree="@Tree.t:3"/>
<distribution R0="@R0Ec.t:3" S0="@S0Ec.t:3" becomeUninfectiousRate="@becomeUninfectiousRateEc.t:3" contemp="true" dR="@dR.t:3" dS="@dS.t:3" id="BDSIRcontemp.t:3" origin="@originEc.t:3" rho="@rhoEc.t:3" spec="beast.phylodynamics.BDSIR" tree="@Tree.t:3">
<parameter id="samplingEc.t:3" lower="0.0" name="samplingProportion" upper="1.0">0.0</parameter>
</distribution>
<prior id="R0PriorEc.t:3" name="distribution" x="@R0Ec.t:3">
<LogNormal id="LogNormalDistributionModel.0" name="distr">
<parameter id="RealParameter.0" lower="0.0" name="M" upper="0.0">0.0</parameter>
Expand Down
21 changes: 17 additions & 4 deletions templates/BDSIR_contemp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ suppressInputs='beast.phylodynamics.BDSIR.intervalTimes,
<parameter name="samplingProportion" id="samplingEc.t:$(n)" value="0." lower="0." upper="1." dimension ="1"/>
</BDSIR>
<distribution id='origRootPriorEc.t:$(n)' x="@originEc.t:$(n)" spec='beast.math.distributions.Prior'>
<distribution id='originPriorEc.t:$(n)' x="@originEc.t:$(n)" spec='beast.math.distributions.Prior'>
<distr spec='beast.math.distributions.Uniform' lower="0." upper="1000."/>
</distribution>
<distribution id="S0_priorEc.t:$(n)" spec="beast.math.distributions.Prior" x="@S0Ec.t:$(n)">
Expand Down Expand Up @@ -95,6 +95,13 @@ suppressInputs='beast.phylodynamics.BDSIR.intervalTimes,
<affectingOperator spec='SubtreeSlide' weight="1" gaussian="true" size="1.0" tree="@Tree.t:$(n)"/>
</operator>
<!-- standard tree operators -->
<operator id='BDSIR_contempUniformOperator.t:$(n)' spec='Uniform' weight="30" tree="@Tree.t:$(n)"/>
<operator id='BDSIR_contempnarrow.t:$(n)' spec='Exchange' isNarrow='true' weight="15" tree="@Tree.t:$(n)"/>
<operator id='BDSIR_contempwide.t:$(n)' spec='Exchange' isNarrow='false' weight="3" tree="@Tree.t:$(n)"/>
<operator id='BDSIR_contempWilsonBalding.t:$(n)' spec='WilsonBalding' weight="3" tree="@Tree.t:$(n)"/>
]]>


Expand All @@ -107,13 +114,19 @@ suppressInputs='beast.phylodynamics.BDSIR.intervalTimes,
<connect srcID='R0PriorEc.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BDSIRcontemp.t:$(n)) and R0Ec.t:$(n)/estimate=true'>prior on R0Ec.t:$(n)</connect>

<connect srcID='SIR_tree_operator.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRcontemp.t:$(n)) and Tree.t:$(n)/estimate=true'/>
<connect srcID='treeScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true and nooperator(SIR_tree_operator.t:$(n))' />
<!--connect srcID='treeScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true and nooperator(SIR_tree_operator.t:$(n))' /-->

<connect srcID='SIR_treeRoot_operator.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRcontemp.t:$(n)) and Tree.t:$(n)/estimate=true'/>
<connect srcID='treeRootScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true and nooperator(SIR_treeRoot_operator.t:$(n))' />
<!--connect srcID='treeRootScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true and nooperator(SIR_treeRoot_operator.t:$(n))' /-->

<connect srcID='SIR_subtreeslide_operator.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRcontemp.t:$(n)) and Tree.t:$(n)/estimate=true'/>
<connect srcID='SubtreeSlide.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true and nooperator(SIR_subtreeslide_operator.t:$(n))' />
<!--connect srcID='SubtreeSlide.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true and nooperator(SIR_subtreeslide_operator.t:$(n))' /-->

<connect srcID='BDSIR_contempUniformOperator.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRcontemp.t:$(n)) and inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'>Draws new internal node heights uniformally for tree t:$(n)</connect>
<connect srcID='BDSIR_contempSubtreeSlide.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRcontemp.t:$(n)) and inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'>Performs subtree slide rearrangement of tree t:$(n)</connect>
<connect srcID='BDSIR_contempnarrow.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRcontemp.t:$(n)) and inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'>Narrow exchange performs local rearrangement of tree t:$(n)</connect>
<connect srcID='BDSIR_contempwide.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRcontemp.t:$(n)) and inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'>Wide exchange performs global rearrangement of tree t:$(n)</connect>
<connect srcID='BDSIR_contempWilsonBalding.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRcontemp.t:$(n)) and inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'>Performs Wilson-Balding global rearrangement of tree t:$(n)</connect>

<plate var='p' range='origin,rho,becomeUninfectiousRate,R0,S0'>

Expand Down
23 changes: 18 additions & 5 deletions templates/BDSIR_serial.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ suppressInputs='beast.phylodynamics.BDSIR.intervalTimes,
<parameter name="samplingProportion" id="samplingProportionEs.t:$(n)" value="0.1" lower="0." upper="1." dimension ="1"/>
</BDSIR>
<distribution id='origRootPriorEs.t:$(n)' x="@originEs.t:$(n)" spec='beast.math.distributions.Prior'>
<distribution id='originPriorEs.t:$(n)' x="@originEs.t:$(n)" spec='beast.math.distributions.Prior'>
<distr spec='beast.math.distributions.Uniform' lower="0." upper="1000."/>
</distribution>
<distribution id="S0_priorEs.t:$(n)" spec="beast.math.distributions.Prior" x="@S0Es.t:$(n)">
Expand Down Expand Up @@ -102,25 +102,38 @@ suppressInputs='beast.phylodynamics.BDSIR.intervalTimes,
<affectingOperator spec='SubtreeSlide' weight="1" gaussian="true" size="1.0" tree="@Tree.t:$(n)"/>
</operator>
<!-- standard tree operators -->
<operator id='BDSIR_serialUniformOperator.t:$(n)' spec='Uniform' weight="30" tree="@Tree.t:$(n)"/>
<operator id='BDSIR_serialnarrow.t:$(n)' spec='Exchange' isNarrow='true' weight="15" tree="@Tree.t:$(n)"/>
<operator id='BDSIR_serialwide.t:$(n)' spec='Exchange' isNarrow='false' weight="3" tree="@Tree.t:$(n)"/>
<operator id='BDSIR_serialWilsonBalding.t:$(n)' spec='WilsonBalding' weight="3" tree="@Tree.t:$(n)"/>
]]>


<connect srcID='BDSIRserial.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BDSIRserial.t:$(n)) and inlikelihood(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'/>

<connect srcID='origRootPriorEs.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BDSIRserial.t:$(n)) and originEs.t:$(n)/estimate=true'>prior on originEs.t:$(n)</connect>
<connect srcID='originPriorEs.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BDSIRserial.t:$(n)) and originEs.t:$(n)/estimate=true'>prior on originEs.t:$(n)</connect>
<connect srcID='S0_priorEs.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BDSIRserial.t:$(n)) and S0Es.t:$(n)/estimate=true'>prior on S0Es.t:$(n)</connect>
<connect srcID='samplingProportionPriorEs.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BDSIRserial.t:$(n)) and samplingProportionEs.t:$(n)/estimate=true'>prior on samplingProportionEs.t:$(n)</connect>
<connect srcID='becomeUninfectiousRatePriorEs.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BDSIRserial.t:$(n)) and becomeUninfectiousRateEs.t:$(n)/estimate=true'>prior over becomeUninfectiousRateEs.t:$(n)</connect>
<connect srcID='R0PriorEs.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BDSIRserial.t:$(n)) and R0Es.t:$(n)/estimate=true'>prior on R0Es.t:$(n)</connect>

<connect srcID='SIR_tree_operatorEs.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRserial.t:$(n)) and Tree.t:$(n)/estimate=true'/>
<connect srcID='treeScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true and nooperator(SIR_tree_operatorEs.t:$(n))' />
<!--connect srcID='treeScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true and nooperator(SIR_tree_operatorEs.t:$(n))' /-->

<connect srcID='SIR_treeRoot_operatorEs.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRserial.t:$(n)) and Tree.t:$(n)/estimate=true'/>
<connect srcID='treeRootScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true and nooperator(SIR_treeRoot_operatorEs.t:$(n))' />
<!--connect srcID='treeRootScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true and nooperator(SIR_treeRoot_operatorEs.t:$(n))' /-->

<connect srcID='SIR_subtreeslide_operatorEs.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRserial.t:$(n)) and Tree.t:$(n)/estimate=true'/>
<connect srcID='SubtreeSlide.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true and nooperator(SIR_subtreeslide_operatorEs.t:$(n))' />
<!--connect srcID='SubtreeSlide.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true and nooperator(SIR_subtreeslide_operatorEs.t:$(n))' /-->

<connect srcID='BDSIR_serialUniformOperator.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRserial.t:$(n)) and inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'>Draws new internal node heights uniformally for tree t:$(n)</connect>
<connect srcID='BDSIR_serialSubtreeSlide.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRserial.t:$(n)) and inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'>Performs subtree slide rearrangement of tree t:$(n)</connect>
<connect srcID='BDSIR_serialnarrow.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRserial.t:$(n)) and inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'>Narrow exchange performs local rearrangement of tree t:$(n)</connect>
<connect srcID='BDSIR_serialwide.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRserial.t:$(n)) and inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'>Wide exchange performs global rearrangement of tree t:$(n)</connect>
<connect srcID='BDSIR_serialWilsonBalding.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BDSIRserial.t:$(n)) and inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'>Performs Wilson-Balding global rearrangement of tree t:$(n)</connect>

<plate var='p' range='origin,samplingProportion,becomeUninfectiousRate,R0,S0'>

Expand Down

0 comments on commit d8274aa

Please sign in to comment.