Skip to content

Commit

Permalink
make param ID's unique
Browse files Browse the repository at this point in the history
  • Loading branch information
denisekuehnert committed Jun 1, 2015
1 parent e60108c commit 27e213b
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions templates/BDSKY_serial.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,36 @@ suppressInputs='beast.evolution.speciation.BirthDeathSkylineModel.intervalTimes,
<![CDATA[
<!-- Sequential Birth Death Skyline model-->
<BirthDeathSkylineModel spec="beast.evolution.speciation.BirthDeathSkylineModel" id="BirthDeathSkySerial.t:$(n)" tree="@Tree.t:$(n)">
<parameter name="origin" id="origin.t:$(n)" value ="100" lower="0." upper="Infinity"/>
<parameter name="R0" id="R0.t:$(n)" value="2" lower="0." dimension ="10" upper="Infinity"/>
<parameter name="becomeUninfectiousRate" id="becomeUninfectiousRate.t:$(n)" value="1." lower="0." upper="Infinity" dimension ="1"/>
<parameter name="samplingProportion" id="samplingProportion.t:$(n)" value="0.01" lower="0." upper="1." dimension ="1"/>
<parameter name="origin" id="origin.s.t:$(n)" value ="100" lower="0." upper="Infinity"/>
<parameter name="R0" id="R0.s.t:$(n)" value="2" lower="0." dimension ="10" upper="Infinity"/>
<parameter name="becomeUninfectiousRate" id="becomeUninfectiousRate.s.t:$(n)" value="1." lower="0." upper="Infinity" dimension ="1"/>
<parameter name="samplingProportion" id="samplingProportion.s.t:$(n)" value="0.01" lower="0." upper="1." dimension ="1"/>
</BirthDeathSkylineModel>
<distribution id='originPrior.t:$(n)' x="@origin.t:$(n)" spec='beast.math.distributions.Prior'>
<distribution id='originPrior.s.t:$(n)' x="@origin.s.t:$(n)" spec='beast.math.distributions.Prior'>
<distr spec='beast.math.distributions.Uniform' lower="0." upper="Infinity"/>
</distribution>
<distribution id="samplingProportionPrior.t:$(n)" spec="beast.math.distributions.Prior" x="@samplingProportion.t:$(n)">
<distribution id="samplingProportionPrior.s.t:$(n)" spec="beast.math.distributions.Prior" x="@samplingProportion.s.t:$(n)">
<distr spec="beast.math.distributions.Beta" alpha="1." beta="1." offset="0."/>
</distribution>
<distribution id="becomeUninfectiousRatePrior.t:$(n)" spec="beast.math.distributions.Prior" x="@becomeUninfectiousRate.t:$(n)">
<distribution id="becomeUninfectiousRatePrior.s.t:$(n)" spec="beast.math.distributions.Prior" x="@becomeUninfectiousRate.s.t:$(n)">
<distr spec='beast.math.distributions.LogNormalDistributionModel' M="0." S="1." offset="0.0" meanInRealSpace="false"/>
</distribution>
<distribution id="RPrior.t:$(n)" spec="beast.math.distributions.Prior" x="@R0.t:$(n)">
<distribution id="RPrior.s.t:$(n)" spec="beast.math.distributions.Prior" x="@R0.s.t:$(n)">
<distr spec='beast.math.distributions.LogNormalDistributionModel' M="0." S="1." offset="0.0" meanInRealSpace="false"/>
</distribution>
<RPNcalculator spec="beast.math.statistic.RPNcalculator" id="birth.t:$(n)" expression="R0.t:$(n) becomeUninfectiousRate.t:$(n) *"> <!-- s/(d+s) -->
<parameter idref="becomeUninfectiousRate.t:$(n)"/>
<parameter idref="R0.t:$(n)"/>
<RPNcalculator spec="beast.math.statistic.RPNcalculator" id="birth.t:$(n)" expression="R0.s.t:$(n) becomeUninfectiousRate.s.t:$(n) *"> <!-- s/(d+s) -->
<parameter idref="becomeUninfectiousRate.s.t:$(n)"/>
<parameter idref="R0.s.t:$(n)"/>
</RPNcalculator>
<RPNcalculator spec="beast.math.statistic.RPNcalculator" id="sampling.t:$(n)" expression="becomeUninfectiousRate.t:$(n) samplingProportion.t:$(n) *">
<parameter idref="becomeUninfectiousRate.t:$(n)"/>
<parameter idref="samplingProportion.t:$(n)"/>
<RPNcalculator spec="beast.math.statistic.RPNcalculator" id="sampling.t:$(n)" expression="becomeUninfectiousRate.s.t:$(n) samplingProportion.s.t:$(n) *">
<parameter idref="becomeUninfectiousRate.s.t:$(n)"/>
<parameter idref="samplingProportion.s.t:$(n)"/>
</RPNcalculator>
<RPNcalculator spec="beast.math.statistic.RPNcalculator" id="death.t:$(n)" expression="becomeUninfectiousRate.t:$(n) 1 samplingProportion.t:$(n) - *"> <!-- b*S0/(d+s) -->
<parameter idref="becomeUninfectiousRate.t:$(n)"/>
<parameter idref="samplingProportion.t:$(n)"/>
<RPNcalculator spec="beast.math.statistic.RPNcalculator" id="death.t:$(n)" expression="becomeUninfectiousRate.s.t:$(n) 1 samplingProportion.s.t:$(n) - *"> <!-- b*S0/(d+s) -->
<parameter idref="becomeUninfectiousRate.s.t:$(n)"/>
<parameter idref="samplingProportion.s.t:$(n)"/>
</RPNcalculator>
<!-- tree operators -->
Expand All @@ -74,24 +74,24 @@ suppressInputs='beast.evolution.speciation.BirthDeathSkylineModel.intervalTimes,
<operator id='BDSKY_serialWilsonBalding.t:$(n)' spec='WilsonBalding' weight="3" tree="@Tree.t:$(n)"/>
<!-- BDSKY operators -->
<operator id='becomeUninfectiousRateScaler.t:$(n)' spec='ScaleOperator' scaleFactor=".75" weight="2" parameter="@becomeUninfectiousRate.t:$(n)"/>
<operator id='samplingScaler.t:$(n)' spec='ScaleOperator' scaleFactor=".75" weight="2" parameter="@samplingProportion.t:$(n)"/>
<operator id='RScaler.t:$(n)' spec='ScaleOperator' scaleFactor=".75" weight="10" parameter="@R0.t:$(n)"/>
<operator id='becomeUninfectiousRateScaler.t:$(n)' spec='ScaleOperator' scaleFactor=".75" weight="2" parameter="@becomeUninfectiousRate.s.t:$(n)"/>
<operator id='samplingScaler.t:$(n)' spec='ScaleOperator' scaleFactor=".75" weight="2" parameter="@samplingProportion.s.t:$(n)"/>
<operator id='RScaler.t:$(n)' spec='ScaleOperator' scaleFactor=".75" weight="10" parameter="@R0.s.t:$(n)"/>
<operator id="updownBD.t:$(n)" spec="UpDownOperator" scaleFactor=".75" weight="2">
<up idref="R0.t:$(n)"/>
<down idref="becomeUninfectiousRate.t:$(n)"/>
<up idref="R0.s.t:$(n)"/>
<down idref="becomeUninfectiousRate.s.t:$(n)"/>
</operator>
<operator id='origScaler.t:$(n)' spec='ScaleOperator' scaleFactor=".75" weight="1" parameter="@origin.t:$(n)"/>
<operator id='origScaler.t:$(n)' spec='ScaleOperator' scaleFactor=".75" weight="1" parameter="@origin.s.t:$(n)"/>
]]>
<connect srcID='BirthDeathSkySerial.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BirthDeathSkySerial.t:$(n)) and inlikelihood(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'/>
<connect srcID='RandomTree.t:$(n)' targetID='BirthDeathSkySerial.t:$(n)' inputName='init' if='inposterior(Tree.t:$(n))'/>

<connect srcID='originPrior.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BirthDeathSkySerial.t:$(n)) and origin.t:$(n)/estimate=true'>prior on origin.t:$(n)</connect>
<connect srcID='samplingProportionPrior.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BirthDeathSkySerial.t:$(n)) and samplingProportion.t:$(n)/estimate=true'>prior on sampling proportion t:$(n)</connect>
<connect srcID='becomeUninfectiousRatePrior.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BirthDeathSkySerial.t:$(n)) and becomeUninfectiousRate.t:$(n)/estimate=true'>prior on becomeUninfectiousRate.t:$(n)</connect>
<connect srcID='RPrior.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BirthDeathSkySerial.t:$(n)) and R0.t:$(n)/estimate=true'>prior on R0.t:$(n)</connect>
<connect srcID='originPrior.s.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BirthDeathSkySerial.t:$(n)) and origin.s.t:$(n)/estimate=true'>prior on origin.s.t:$(n)</connect>
<connect srcID='samplingProportionPrior.s.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BirthDeathSkySerial.t:$(n)) and samplingProportion.s.t:$(n)/estimate=true'>prior on sampling proportion t:$(n)</connect>
<connect srcID='becomeUninfectiousRatePrior.s.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BirthDeathSkySerial.t:$(n)) and becomeUninfectiousRate.s.t:$(n)/estimate=true'>prior on becomeUninfectiousRate.s.t:$(n)</connect>
<connect srcID='RPrior.s.t:$(n)' targetID='prior' inputName='distribution' if='inposterior(BirthDeathSkySerial.t:$(n)) and R0.s.t:$(n)/estimate=true'>prior on R0.s.t:$(n)</connect>

<connect srcID='BDSKY_serialtreeScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BirthDeathSkySerial.t:$(n)) and inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'>Scales all internal nodes for tree t:$(n)</connect>
<connect srcID='BDSKY_serialtreeRootScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BirthDeathSkySerial.t:$(n)) and inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'>Scales root node for tree t:$(n)</connect>
Expand All @@ -101,18 +101,18 @@ suppressInputs='beast.evolution.speciation.BirthDeathSkylineModel.intervalTimes,
<connect srcID='BDSKY_serialwide.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BirthDeathSkySerial.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='BDSKY_serialWilsonBalding.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BirthDeathSkySerial.t:$(n)) and inposterior(Tree.t:$(n)) and Tree.t:$(n)/estimate=true'>Performs Wilson-Balding global rearrangement of tree t:$(n)</connect>

<connect srcID='becomeUninfectiousRateScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BirthDeathSkySerial.t:$(n)) and becomeUninfectiousRate.t:$(n)/estimate=true'/>
<connect srcID='samplingScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BirthDeathSkySerial.t:$(n)) and samplingProportion.t:$(n)/estimate=true'/>
<connect srcID='RScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BirthDeathSkySerial.t:$(n)) and R0.t:$(n)/estimate=true'/>
<connect srcID='updownBD.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BirthDeathSkySerial.t:$(n)) and R0.t:$(n)/estimate=true and becomeUninfectiousRate.t:$(n)/estimate=true'/>
<connect srcID='origScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BirthDeathSkySerial.t:$(n)) and origin.t:$(n)/estimate=true'/>
<connect srcID='becomeUninfectiousRateScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BirthDeathSkySerial.t:$(n)) and becomeUninfectiousRate.s.t:$(n)/estimate=true'/>
<connect srcID='samplingScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BirthDeathSkySerial.t:$(n)) and samplingProportion.s.t:$(n)/estimate=true'/>
<connect srcID='RScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BirthDeathSkySerial.t:$(n)) and R0.s.t:$(n)/estimate=true'/>
<connect srcID='updownBD.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BirthDeathSkySerial.t:$(n)) and R0.s.t:$(n)/estimate=true and becomeUninfectiousRate.s.t:$(n)/estimate=true'/>
<connect srcID='origScaler.t:$(n)' targetID='mcmc' inputName='operator' if='inposterior(BirthDeathSkySerial.t:$(n)) and origin.s.t:$(n)/estimate=true'/>



<connect srcID='BirthDeathSkySerial.t:$(n)' targetID='tracelog' inputName='log' if='inposterior(BirthDeathSkySerial.t:$(n))'/>
<plate var='p' range='origin,samplingProportion,becomeUninfectiousRate,R0'>
<connect srcID='$(p).t:$(n)' targetID='state' inputName='stateNode' if='inposterior(BirthDeathSkySerial.t:$(n)) and $(p).t:$(n)/estimate=true'/>
<connect srcID='$(p).t:$(n)' targetID='tracelog' inputName='log' if='inposterior(BirthDeathSkySerial.t:$(n)) and $(p).t:$(n)/estimate=true'/>
<connect srcID='$(p).s.t:$(n)' targetID='state' inputName='stateNode' if='inposterior(BirthDeathSkySerial.t:$(n)) and $(p).s.t:$(n)/estimate=true'/>
<connect srcID='$(p).s.t:$(n)' targetID='tracelog' inputName='log' if='inposterior(BirthDeathSkySerial.t:$(n)) and $(p).s.t:$(n)/estimate=true'/>
</plate>
<plate var='p' range='birth,death,sampling'>
<connect srcID='$(p).t:$(n)' targetID='tracelog' inputName='log' if='inposterior(BirthDeathSkySerial.t:$(n))'/>
Expand Down

0 comments on commit 27e213b

Please sign in to comment.