Skip to content

Commit

Permalink
more v2.7 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouckaert committed Oct 10, 2022
1 parent 1f60926 commit ee765d2
Show file tree
Hide file tree
Showing 59 changed files with 240 additions and 166 deletions.
35 changes: 28 additions & 7 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<!-- Location to check for local copy of beast2 repository -->
<property name="beastDir" location="../beast2"/>
<property name="BeastFXDir" location="../BeastFX"/>

<!-- Location to check for local copy of BEASTLabs repository -->
<property name="beastLabsDir" location="../BEASTLabs"/>
Expand All @@ -18,7 +19,7 @@
<!-- Directories necessary for all BEAST 2 packages -->
<property name="doc" location="doc"/>
<property name="examples" location="examples"/>
<property name="templates" location="templates"/>
<property name="fxtemplates" location="fxtemplates"/>

<!-- BEAST branch and version to build against
(only different for version tags because of
Expand Down Expand Up @@ -106,6 +107,25 @@
<fileset dir="${beastDir}/lib" includes="*.jar"/>
</classpath>
</javac>
<javac target="${targetVersion}" source="${sourceVersion}"
srcdir="${beastDir}/test"
destdir="${build-beast}" includeantruntime="false">
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="${beastDir}/lib" includes="*.jar"/>
<fileset dir="${beastDir}/lib/junit" includes="*.jar"/>
</classpath>
</javac>
<javac target="${targetVersion}" source="${sourceVersion}"
srcdir="${BeastFXDir}/src"
destdir="${build-beast}" includeantruntime="false">
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="${beastDir}/lib" includes="*.jar"/>
<fileset dir="${beastDir}/lib/junit" includes="*.jar"/>
<fileset dir="${BeastFXDir}/locallib" includes="*.jar"/>
</classpath>
</javac>
<jar jarfile="${build-lib}/beast2.jar" basedir="${build-beast}" />
<copy todir="${build-lib}">
<fileset dir="${beastDir}/lib" includes="*.jar"/>
Expand Down Expand Up @@ -158,6 +178,7 @@
<javac target="${targetVersion}" source="${sourceVersion}"
srcdir="${beastLabsDir}/src"
destdir="${build-beastlabs}" includeantruntime="false">
<include name="beastlabs/**/**" />
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="${beastLabsDir}/lib" includes="*.jar"/>
Expand Down Expand Up @@ -238,7 +259,7 @@

<mkdir dir="${pack}"/>
<mkdir dir="${pack}/examples"/>
<mkdir dir="${pack}/templates"/>
<mkdir dir="${pack}/fxtemplates"/>
<mkdir dir="${pack}/lib"/>
<mkdir dir="${pack}/doc"/>

Expand All @@ -261,9 +282,9 @@
<fileset dir="${examples}" includes="**/*" />
</copy>

<mkdir dir="${templates}" />
<copy todir="${pack}/templates">
<fileset dir="${templates}" includes="*.xml" />
<mkdir dir="${fxtemplates}" />
<copy todir="${pack}/fxtemplates">
<fileset dir="${fxtemplates}" includes="*.xml" />
</copy>

<mkdir dir="${doc}" />
Expand Down Expand Up @@ -356,7 +377,7 @@
<mkdir dir="${test}"/>
<mkdir dir="${lib}"/>
<mkdir dir="${examples}"/>
<mkdir dir="${templates}"/>
<mkdir dir="${fxtemplates}"/>
<mkdir dir="${doc}"/>

<echo/>
Expand All @@ -367,7 +388,7 @@
<echo>${test} - your junit tests go here (You _are_ going to write, those, aren't you!)</echo>
<echo>${doc} - your documentation goes here</echo>
<echo>${examples} - your example XML scripts go here</echo>
<echo>${templates} - your BEAUti templates go here</echo>
<echo>${fxtemplates} - your BEAUti fxtemplates go here</echo>
<echo/>
<echo>To build your package, just type "ant" at the command line.</echo>
<echo/>
Expand Down
18 changes: 9 additions & 9 deletions examples/bears.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Ursus_spelaeus_0.054=0.054 <taxa id="TaxonSet.bears" spec="TaxonS

<distribution id="posterior" spec="beast.base.inference.CompoundDistribution">
<distribution id="prior" spec="beast.base.inference.CompoundDistribution">
<distribution id="FBD.t:bears" spec="beast.evolution.speciation.SABirthDeathModel" conditionOnRhoSampling="true" diversificationRate="@diversificationRateFBD.t:bears" origin="@originFBD.t:bears" samplingProportion="@samplingProportionFBD.t:bears" tree="@Tree.t:bears" turnover="@turnoverFBD.t:bears">
<distribution id="FBD.t:bears" spec="sa.evolution.speciation.SABirthDeathModel" conditionOnRhoSampling="true" diversificationRate="@diversificationRateFBD.t:bears" origin="@originFBD.t:bears" samplingProportion="@samplingProportionFBD.t:bears" tree="@Tree.t:bears" turnover="@turnoverFBD.t:bears">
<parameter id="rFBD.t:bears" lower="0.0" name="removalProbability" upper="1.0">0.0</parameter>
<parameter id="rhoFBD.t:bears" estimate="false" lower="0.0" name="rho" upper="1.0">1.0</parameter>
</distribution>
Expand Down Expand Up @@ -196,19 +196,19 @@ Ursus_spelaeus_0.054=0.054 <taxa id="TaxonSet.bears" spec="TaxonS

<operator id="samplingPScalerFBD.t:bears" spec="ScaleOperator" parameter="@samplingProportionFBD.t:bears" scaleFactor="0.75" weight="10.0"/>

<operator id="LeafToSAFBD.t:bears" spec="LeafToSampledAncestorJump" tree="@Tree.t:bears" weight="10.0"/>
<operator id="LeafToSAFBD.t:bears" spec="sa.evolution.operators.LeafToSampledAncestorJump" tree="@Tree.t:bears" weight="10.0"/>

<operator id="SAWilsonBaldingFBD.t:bears" spec="SAWilsonBalding" tree="@Tree.t:bears" weight="10.0"/>
<operator id="SAWilsonBaldingFBD.t:bears" spec="sa.evolution.operators.SAWilsonBalding" tree="@Tree.t:bears" weight="10.0"/>

<operator id="SAWideFBD.t:bears" spec="SAExchange" isNarrow="false" tree="@Tree.t:bears" weight="10.0"/>
<operator id="SAWideFBD.t:bears" spec="sa.evolution.operators.SAExchange" isNarrow="false" tree="@Tree.t:bears" weight="10.0"/>

<operator id="SANarrowFBD.t:bears" spec="SAExchange" tree="@Tree.t:bears" weight="10.0"/>
<operator id="SANarrowFBD.t:bears" spec="sa.evolution.operators.SAExchange" tree="@Tree.t:bears" weight="10.0"/>

<operator id="SAUniformOperatorFBD.t:bears" spec="SAUniform" tree="@Tree.t:bears" weight="20.0"/>
<operator id="SAUniformOperatorFBD.t:bears" spec="sa.evolution.operators.SAUniform" tree="@Tree.t:bears" weight="20.0"/>

<operator id="SATreeRootScalerFBD.t:bears" spec="SAScaleOperator" rootOnly="true" scaleFactor="0.95" tree="@Tree.t:bears" weight="1.0"/>
<operator id="SATreeRootScalerFBD.t:bears" spec="sa.evolution.operators.SAScaleOperator" rootOnly="true" scaleFactor="0.95" tree="@Tree.t:bears" weight="1.0"/>

<operator id="SATreeScalerFBD.t:bears" spec="SAScaleOperator" scaleFactor="0.95" tree="@Tree.t:bears" weight="3.0"/>
<operator id="SATreeScalerFBD.t:bears" spec="sa.evolution.operators.SAScaleOperator" scaleFactor="0.95" tree="@Tree.t:bears" weight="3.0"/>

<logger id="tracelog" fileName="bears.log" logEvery="1000" model="@posterior" sanitiseHeaders="true" sort="smart">
<log idref="posterior"/>
Expand All @@ -224,7 +224,7 @@ Ursus_spelaeus_0.054=0.054 <taxa id="TaxonSet.bears" spec="TaxonS
<log idref="diversificationRateFBD.t:bears"/>
<log idref="turnoverFBD.t:bears"/>
<log idref="samplingProportionFBD.t:bears"/>
<log id="SACountFBD.t:bears" spec="beast.evolution.tree.SampledAncestorLogger" tree="@Tree.t:bears"/>
<log id="SACountFBD.t:bears" spec="sa.evolution.tree.SampledAncestorLogger" tree="@Tree.t:bears"/>
<log idref="Canidae.prior"/>
</logger>

Expand Down
22 changes: 11 additions & 11 deletions examples/bears_ranges.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Ursus_spelaeus_0.054=0.054 <taxa id="TaxonSet.bears" spec="TaxonS

<distribution id="posterior" spec="beast.base.inference.CompoundDistribution">
<distribution id="prior" spec="beast.base.inference.CompoundDistribution">
<distribution id="FBD.t:bears" spec="beast.evolution.speciation.SABirthDeathModel" conditionOnRhoSampling="true" diversificationRate="@diversificationRateFBD.t:bears" origin="@originFBD.t:bears" samplingProportion="@samplingProportionFBD.t:bears" tree="@Tree.t:bears" turnover="@turnoverFBD.t:bears">
<distribution id="FBD.t:bears" spec="sa.evolution.speciation.SABirthDeathModel" conditionOnRhoSampling="true" diversificationRate="@diversificationRateFBD.t:bears" origin="@originFBD.t:bears" samplingProportion="@samplingProportionFBD.t:bears" tree="@Tree.t:bears" turnover="@turnoverFBD.t:bears">
<parameter id="rFBD.t:bears" lower="0.0" name="removalProbability" upper="1.0">0.0</parameter>
<parameter id="rhoFBD.t:bears" estimate="false" lower="0.0" name="rho" upper="1.0">1.0</parameter>
</distribution>
Expand Down Expand Up @@ -196,25 +196,25 @@ Ursus_spelaeus_0.054=0.054 <taxa id="TaxonSet.bears" spec="TaxonS

<operator id="samplingPScalerFBD.t:bears" spec="ScaleOperator" parameter="@samplingProportionFBD.t:bears" scaleFactor="0.75" weight="10.0"/>

<operator id="LeafToSAFBD.t:bears" spec="LeafToSampledAncestorJump" tree="@Tree.t:bears" weight="10.0"/>
<operator id="LeafToSAFBD.t:bears" spec="sa.evolution.operators.LeafToSampledAncestorJump" tree="@Tree.t:bears" weight="10.0"/>

<operator id="SAWilsonBaldingFBD.t:bears" spec="SAWilsonBalding" tree="@Tree.t:bears" weight="10.0"/>
<operator id="SAWilsonBaldingFBD.t:bears" spec="sa.evolution.operators.SAWilsonBalding" tree="@Tree.t:bears" weight="10.0"/>

<operator id="SAWideFBD.t:bears" spec="SAExchange" isNarrow="false" tree="@Tree.t:bears" weight="10.0"/>
<operator id="SAWideFBD.t:bears" spec="sa.evolution.operators.SAExchange" isNarrow="false" tree="@Tree.t:bears" weight="10.0"/>

<operator id="SANarrowFBD.t:bears" spec="SAExchange" tree="@Tree.t:bears" weight="10.0"/>
<operator id="SANarrowFBD.t:bears" spec="sa.evolution.operators.SAExchange" tree="@Tree.t:bears" weight="10.0"/>

<operator id="SAUniformOperatorFBD.t:bears" spec="SAUniform" tree="@Tree.t:bears" weight="20.0"/>
<operator id="SAUniformOperatorFBD.t:bears" spec="sa.evolution.operators.SAUniform" tree="@Tree.t:bears" weight="20.0"/>

<operator id="SATreeRootScalerFBD.t:bears" spec="SAScaleOperator" rootOnly="true" scaleFactor="0.95" tree="@Tree.t:bears" weight="1.0"/>
<operator id="SATreeRootScalerFBD.t:bears" spec="sa.evolution.operators.SAScaleOperator" rootOnly="true" scaleFactor="0.95" tree="@Tree.t:bears" weight="1.0"/>

<operator id="SATreeScalerFBD.t:bears" spec="SAScaleOperator" scaleFactor="0.95" tree="@Tree.t:bears" weight="3.0"/>
<operator id="SATreeScalerFBD.t:bears" spec="sa.evolution.operators.SAScaleOperator" scaleFactor="0.95" tree="@Tree.t:bears" weight="3.0"/>

<!-- ADD FOSSIL OCCURRENCE DATE RANGES HERE AS FOLLOWS -->

<!-- this operator allows to sample dates of fossil samples. The dates will be variable for all the
taxa listed in the taxonset input and in the samplingDates inputs -->
<operator spec='SampledNodeDateRandomWalker' windowSize="1" tree="@Tree.t:bears" weight="10">
<operator spec='sa.evolution.operators.SampledNodeDateRandomWalker' windowSize="1" tree="@Tree.t:bears" weight="10">
<!-- this input specify the taxa with variable dates. In this example only one taxon has a variable sampling date. Add more if you need.
If this input is not specified then all the leaves except the most recent are assumed to have
variable sampling dates. -->
Expand All @@ -225,7 +225,7 @@ Ursus_spelaeus_0.054=0.054 <taxa id="TaxonSet.bears" spec="TaxonS
with a sampling date range. In this example, the only taxon with a varaible sampling date
has also sampling date range with bounds 1 and 15. Note that if a samplingDates is specified for
a taxon then the bounds will be used even if this taxon is not in the taxonset. -->
<samplingDates id="samplingDate1" spec="beast.evolution.tree.SamplingDate" taxon="Ursavus_primaevus_14.41" upper="15." lower="1."/>
<samplingDates id="samplingDate1" spec="sa.evolution.tree.SamplingDate" taxon="Ursavus_primaevus_14.41" upper="15." lower="1."/>
</operator>

<logger id="tracelog" fileName="bears.log" logEvery="1000" model="@posterior" sanitiseHeaders="true" sort="smart">
Expand All @@ -242,7 +242,7 @@ Ursus_spelaeus_0.054=0.054 <taxa id="TaxonSet.bears" spec="TaxonS
<log idref="diversificationRateFBD.t:bears"/>
<log idref="turnoverFBD.t:bears"/>
<log idref="samplingProportionFBD.t:bears"/>
<log id="SACountFBD.t:bears" spec="beast.evolution.tree.SampledAncestorLogger" tree="@Tree.t:bears"/>
<log id="SACountFBD.t:bears" spec="sa.evolution.tree.SampledAncestorLogger" tree="@Tree.t:bears"/>
<log idref="Canidae.prior"/>
</logger>

Expand Down
Loading

0 comments on commit ee765d2

Please sign in to comment.