bella-companion 0.0.28__py3-none-any.whl → 0.0.30__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of bella-companion might be problematic. Click here for more details.
- bella_companion/eucovid/beast_configs/GLM.xml +125 -405
- bella_companion/eucovid/beast_configs/MLP.xml +108 -288
- bella_companion/eucovid/run_beast.py +11 -17
- bella_companion/platyrrhine/beast_config.xml +2 -2
- bella_companion/platyrrhine/run_beast.py +4 -7
- bella_companion/simulations/beast_configs/epi-multitype/MLP.xml +1 -1
- bella_companion/simulations/beast_configs/epi-skyline/MLP.xml +1 -1
- bella_companion/simulations/beast_configs/fbd-2traits/MLP.xml +2 -2
- bella_companion/simulations/beast_configs/fbd-no-traits/MLP.xml +2 -2
- {bella_companion-0.0.28.dist-info → bella_companion-0.0.30.dist-info}/METADATA +1 -1
- {bella_companion-0.0.28.dist-info → bella_companion-0.0.30.dist-info}/RECORD +13 -13
- {bella_companion-0.0.28.dist-info → bella_companion-0.0.30.dist-info}/WHEEL +0 -0
- {bella_companion-0.0.28.dist-info → bella_companion-0.0.30.dist-info}/entry_points.txt +0 -0
|
@@ -1,350 +1,170 @@
|
|
|
1
|
-
<?xml version="1.0"
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
2
|
<beast
|
|
3
3
|
namespace="
|
|
4
|
-
:beast.base.
|
|
5
|
-
:beast.base.
|
|
4
|
+
:beast.base.evolution
|
|
5
|
+
:beast.base.evolution.alignment
|
|
6
6
|
:beast.base.evolution.branchratemodel
|
|
7
|
-
:beast.base.evolution.substitutionmodel
|
|
8
|
-
:beast.base.evolution.sitemodel
|
|
9
|
-
:beast.base.evolution.tree.coalescent
|
|
10
|
-
:beast.base.evolution.tree
|
|
11
7
|
:beast.base.evolution.likelihood
|
|
12
|
-
:beast.base.evolution.alignment
|
|
13
8
|
:beast.base.evolution.operator
|
|
14
9
|
:beast.base.evolution.operator.kernel
|
|
10
|
+
:beast.base.evolution.sitemodel
|
|
11
|
+
:beast.base.evolution.substitutionmodel
|
|
12
|
+
:beast.base.evolution.tree
|
|
13
|
+
:beast.base.evolution.tree.coalescent
|
|
14
|
+
:beast.base.inference
|
|
15
|
+
:beast.base.inference.parameter
|
|
15
16
|
:beast.base.inference.operator.kernel
|
|
16
|
-
:beast.base.inference.operator
|
|
17
|
-
:beast.base.math.distributions
|
|
18
|
-
:beast.base.evolution
|
|
19
|
-
:bdmmprime.util.operators
|
|
20
|
-
:bdmmprime.util.priors
|
|
21
17
|
:bdmmprime.distribution
|
|
22
|
-
:bdmmprime.parameterization
|
|
23
18
|
:bdmmprime.mapping
|
|
24
|
-
:bdmmprime.util
|
|
25
19
|
:bdmmprime.trajectories
|
|
26
|
-
:
|
|
27
|
-
:
|
|
28
|
-
:
|
|
29
|
-
:
|
|
30
|
-
:feast.
|
|
31
|
-
:glmprior.util"
|
|
32
|
-
required="BEAST.base v2.7.7:BDMM-Prime v2.2.2"
|
|
20
|
+
:bdmmprime.parameterization
|
|
21
|
+
:bdmmprime.util
|
|
22
|
+
:bdmmprime.util.operators
|
|
23
|
+
:bdmmprime.util.priors
|
|
24
|
+
:feast.fileio"
|
|
33
25
|
version="2.7"
|
|
34
26
|
>
|
|
35
|
-
<map name="Uniform"
|
|
36
|
-
<map name="Exponential"
|
|
37
|
-
<map name="LogNormal"
|
|
38
|
-
<map name="Normal"
|
|
39
|
-
<map name="
|
|
40
|
-
<map name="
|
|
41
|
-
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<processLength id="originBDMMPrime" spec="RealParameter">10.0</processLength>
|
|
55
|
-
|
|
56
|
-
<Re id="ReSV" spec="SkylineVectorParameter" timesAreAges="true" processLength="@originBDMMPrime" typeSet="@typeSetBDMMPrime">
|
|
57
|
-
<skylineValues id="ReValues" spec="RealParameter">1.0 1.1 1.2 1.3 1.4 1.01 1.1 1.2 1.3 1.4</skylineValues>
|
|
58
|
-
<changeTimes id="ReRateChangeTimes" spec="RealParameter">0.123</changeTimes>
|
|
59
|
-
</Re>
|
|
60
|
-
|
|
61
|
-
<samplingProportion id="samplingProportionSV" spec="SkylineVectorParameter"
|
|
62
|
-
timesAreAges="true" processLength="@originBDMMPrime" typeSet="@typeSetBDMMPrime">
|
|
63
|
-
<skylineValues id="samplingProportionValues" spec="RealParameter" dimension="15" lower="0.0" upper="1.0">1.11E-5 1.2E-5 1.3E-5 1.4E-5 1.5E-5 1.1E-5 1.2E-5 1.3E-5 1.4E-5 1.5E-5 0.0 0.0 0.0 0.0 0.0</skylineValues>
|
|
64
|
-
<changeTimes id="samplingProportionChangeTimes" spec="RealParameter">0.123 0.205</changeTimes>
|
|
65
|
-
</samplingProportion>
|
|
66
|
-
|
|
67
|
-
<becomeUninfectiousRate id="becomeUninfectiousRateSV" spec="SkylineVectorParameter"
|
|
68
|
-
typeSet="@typeSetBDMMPrime">
|
|
69
|
-
<skylineValues id="becomeUninfectiousValues" spec="RealParameter">36.5</skylineValues>
|
|
70
|
-
</becomeUninfectiousRate>
|
|
71
|
-
|
|
72
|
-
<migrationRate id="migrationRateSM" spec="SkylineMatrixParameter"
|
|
73
|
-
timesAreAges="true" processLength="@originBDMMPrime" typeSet="@typeSetBDMMPrime">
|
|
74
|
-
|
|
75
|
-
<skylineValues id="migrationRateValues" spec="bella.BayesMLP" nodes="$(nodes)">
|
|
76
|
-
<plate var="predictor" range="$(GLMpredictor_files)">
|
|
77
|
-
<predictor spec="RealParameterFromXSV" id="$(predictor)" fileName="$(predictor)"/>
|
|
78
|
-
</plate>
|
|
79
|
-
|
|
80
|
-
<plate var="n" range="$(layersRange)">
|
|
81
|
-
<weights idref="migrationW$(n)"/>
|
|
82
|
-
</plate>
|
|
83
|
-
|
|
84
|
-
</skylineValues>
|
|
85
|
-
|
|
86
|
-
<changeTimes id="migrationRateChangeTimes" spec="RealParameterFromXSV"
|
|
87
|
-
fileName="$(GLMpredictor_changetimes)"/>
|
|
88
|
-
</migrationRate>
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
<removalProb id="removalProbSV" spec="SkylineVectorParameter" skylineValues="1.0"
|
|
93
|
-
processLength="@originBDMMPrime" typeSet="@typeSetBDMMPrime"/>
|
|
94
|
-
|
|
95
|
-
<startTypePriorProbs id="typeFrequencies" spec="RealParameter"
|
|
96
|
-
estimate="false" lower="0.0" upper="1.0">1.0 0.0 0.0 0.0 0.0</startTypePriorProbs>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<!-- Site Model -->
|
|
100
|
-
<siteModel id="siteModel" spec="SiteModel" gammaCategoryCount="4">
|
|
101
|
-
<parameter id="gammaShape" name="shape" value="1.0"/>
|
|
102
|
-
<parameter name="mutationRate" estimate="false" value="1.0"/>
|
|
103
|
-
<parameter name="proportionInvariant" estimate="false" value="0.0"/>
|
|
104
|
-
|
|
105
|
-
<substModel spec="HKY">
|
|
106
|
-
<kappa id="kappa" spec="RealParameter" value="2.0"/>
|
|
107
|
-
<frequencies id="empiricalFreqs" spec="Frequencies" data="@alignment"/>
|
|
108
|
-
</substModel>
|
|
109
|
-
</siteModel>
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
<!-- Branch rate Model -->
|
|
113
|
-
<branchRateModel id="branchRateModel" spec="StrictClockModel">
|
|
114
|
-
<parameter id="clockRate" name="clock.rate" estimate="false">8.0E-4</parameter>
|
|
115
|
-
</branchRateModel>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<!-- Population Model for Tree initialiser -->
|
|
119
|
-
<popFunc id="popFunc" spec="ConstantPopulation">
|
|
120
|
-
<popSize spec="RealParameter" value="0.1"/>
|
|
121
|
-
</popFunc>
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
<!-- MCMC -->
|
|
125
|
-
<run id="mcmc" spec="MCMC" chainLength="10000000" numInitializationAttempts="100">
|
|
126
|
-
|
|
127
|
-
<!-- State -->
|
|
27
|
+
<map name="Uniform">beast.base.inference.distribution.Uniform</map>
|
|
28
|
+
<map name="Exponential">beast.base.inference.distribution.Exponential</map>
|
|
29
|
+
<map name="LogNormal">beast.base.inference.distribution.LogNormalDistributionModel</map>
|
|
30
|
+
<map name="Normal">beast.base.inference.distribution.Normal</map>
|
|
31
|
+
<map name="prior">beast.base.inference.distribution.Prior</map>
|
|
32
|
+
<map name="AlignmentFromFasta">feast.fileio.AlignmentFromFasta</map>
|
|
33
|
+
<map name="TaxonSet">beast.base.evolution.alignment.TaxonSet</map>
|
|
34
|
+
<map name="TraitSetFromTaxonSet">feast.fileio.TraitSetFromTaxonSet</map>
|
|
35
|
+
<map name="TypeSet">bdmmprime.parameterization.TypeSet</map>
|
|
36
|
+
<map name="TypeMappedTree">bdmmprime.mapping.TypeMappedTree</map>
|
|
37
|
+
|
|
38
|
+
<AlignmentFromFasta id="alignment" fileName="$(msa_file)"/>
|
|
39
|
+
<TaxonSet id="taxonSet" alignment="@alignment"/>
|
|
40
|
+
<TraitSetFromTaxonSet id="typeTraitSet" traitname="type" delimiter="|" takeGroup="1" taxa="@taxonSet"/>
|
|
41
|
+
<TypeSet id="typeSet" typeTraitSet="@typeTraitSet"/>
|
|
42
|
+
<TraitSetFromTaxonSet id="dateTrait" traitname="date" dateFormat="yyyy-M-dd" delimiter="|" everythingAfterLast="true" taxa="@taxonSet"/>
|
|
43
|
+
<TypeMappedTree id="typeMappedTree" bdmmDistrib="@BDMMPrime" startTypePriorProbs="@startTypePriorProbs" mapOnInit="false" remapOnLog="true" typeLabel="type" typeTraitSet="@typeTraitSet" untypedTree="@tree"/>
|
|
44
|
+
|
|
45
|
+
<run spec="MCMC" chainLength="10000000">
|
|
128
46
|
<state id="state" spec="State">
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
taxa="@alignment"
|
|
132
|
-
populationModel="@popFunc"
|
|
133
|
-
trait="@dateTrait">
|
|
47
|
+
<stateNode id="tree" spec="RandomTree" taxa="@alignment" trait="@dateTrait">
|
|
48
|
+
<populationModel spec="ConstantPopulation" popSize="0.1"/>
|
|
134
49
|
</stateNode>
|
|
135
|
-
|
|
136
|
-
<stateNode
|
|
137
|
-
<stateNode idref="ReValues"/>
|
|
138
|
-
<stateNode idref="samplingProportionValues"/>
|
|
50
|
+
<stateNode id="Re" spec="RealParameter" value="1.0 1.1 1.2 1.3 1.4 1.01 1.1 1.2 1.3 1.4"/>
|
|
51
|
+
<stateNode id="samplingProportion" spec="RealParameter" value="1.11E-5 1.2E-5 1.3E-5 1.4E-5 1.5E-5 1.1E-5 1.2E-5 1.3E-5 1.4E-5 1.5E-5 0.0 0.0 0.0 0.0 0.0"/>
|
|
139
52
|
<plate var="n" range="$(layersRange)">
|
|
140
|
-
<stateNode spec="RealParameter" id="
|
|
53
|
+
<stateNode spec="RealParameter" id="migrationRateW$(n)" value="0"/>
|
|
141
54
|
</plate>
|
|
142
|
-
|
|
143
|
-
<stateNode
|
|
144
|
-
<stateNode
|
|
145
|
-
|
|
55
|
+
<stateNode id="processLength" spec="RealParameter" value="10.0"/>
|
|
56
|
+
<stateNode id="gammaShape" spec="RealParameter" value="1.0"/>
|
|
57
|
+
<stateNode id="kappa" spec="RealParameter" value="2.0"/>
|
|
146
58
|
</state>
|
|
147
59
|
|
|
148
|
-
|
|
149
|
-
<!-- Posterior Distribution -->
|
|
150
60
|
<distribution id="posterior" spec="CompoundDistribution">
|
|
151
|
-
|
|
152
|
-
<!-- Tree Likelihood -->
|
|
153
61
|
<distribution id="likelihood" spec="CompoundDistribution" useThreads="true">
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
62
|
+
<distribution id="treeLikelihood" spec="ThreadedTreeLikelihood" data="@alignment" tree="@tree">
|
|
63
|
+
<siteModel spec="SiteModel" gammaCategoryCount="4" shape="@gammaShape" mutationRate="1.0">
|
|
64
|
+
<substModel spec="HKY" kappa="@kappa">
|
|
65
|
+
<frequencies spec="Frequencies" data="@alignment"/>
|
|
66
|
+
</substModel>
|
|
67
|
+
</siteModel>
|
|
68
|
+
<branchRateModel spec="StrictClockModel" clock.rate="8.0E-4"/>
|
|
69
|
+
</distribution>
|
|
161
70
|
</distribution>
|
|
162
71
|
|
|
163
|
-
<!-- Prior distribution -->
|
|
164
72
|
<distribution id="prior" spec="CompoundDistribution">
|
|
73
|
+
<distribution id="BDMMPrime" spec="BirthDeathMigrationDistribution" tree="@tree" conditionOnSurvival="true" typeTraitSet="@typeTraitSet">
|
|
74
|
+
<parameterization id="EpiBDMMPrimeParameterization" spec="EpiParameterization" processLength="@processLength" typeSet="@typeSet">
|
|
75
|
+
<Re id="ReSP" spec="SkylineVectorParameter" skylineValues="@Re" changeTimes="0.123" timesAreAges="true" processLength="@processLength" typeSet="@typeSet" />
|
|
76
|
+
<samplingProportion id="samplingProportionSP" spec="SkylineVectorParameter" skylineValues="@samplingProportion" changeTimes="0.123 0.205" timesAreAges="true" processLength="@processLength" typeSet="@typeSet"/>
|
|
77
|
+
<becomeUninfectiousRate spec="SkylineVectorParameter" skylineValues="36.5" typeSet="@typeSet"/>
|
|
78
|
+
<migrationRate id="migrationRateSP" spec="SkylineMatrixParameter" timesAreAges="true" processLength="@processLength" typeSet="@typeSet">
|
|
79
|
+
<skylineValues id="migrationRate" spec="bella.BayesMLP" nodes="$(nodes)">
|
|
80
|
+
<plate var="predictorFile" range="$(predictorFiles)">
|
|
81
|
+
<predictor spec="RealParameterFromXSV" fileName="$(predictorFile)"/>
|
|
82
|
+
</plate>
|
|
83
|
+
<plate var="n" range="$(layersRange)">
|
|
84
|
+
<weights idref="migrationRateW$(n)"/>
|
|
85
|
+
</plate>
|
|
86
|
+
</skylineValues>
|
|
87
|
+
<changeTimes spec="RealParameterFromXSV" fileName="$(changeTimesFile)"/>
|
|
88
|
+
</migrationRate>
|
|
89
|
+
<removalProb spec="SkylineVectorParameter" skylineValues="1.0" typeSet="@typeSet"/>
|
|
90
|
+
</parameterization>
|
|
91
|
+
<startTypePriorProbs id="startTypePriorProbs" spec="RealParameter" value="1.0 0.0 0.0 0.0 0.0"/>
|
|
92
|
+
</distribution>
|
|
165
93
|
|
|
166
|
-
|
|
167
|
-
<distribution id="BDMMPrime" spec="BirthDeathMigrationDistribution"
|
|
168
|
-
tree="@treeBDMMPrime"
|
|
169
|
-
conditionOnSurvival="true"
|
|
170
|
-
finalSampleOffset="0.0"
|
|
171
|
-
typeTraitSet="@typeTraitSet"
|
|
172
|
-
startTypePriorProbs="@typeFrequencies">
|
|
173
|
-
|
|
174
|
-
<!-- Parameterization BDMM-Prime -->
|
|
175
|
-
<parameterization id="EpiBDMMPrimeParameterization" spec="EpiParameterization"
|
|
176
|
-
processLength="@originBDMMPrime"
|
|
177
|
-
Re="@ReSV"
|
|
178
|
-
samplingProportion="@samplingProportionSV"
|
|
179
|
-
becomeUninfectiousRate="@becomeUninfectiousRateSV"
|
|
180
|
-
migrationRate="@migrationRateSM"
|
|
181
|
-
removalProb="@removalProbSV"
|
|
182
|
-
typeSet="@typeSetBDMMPrime"/>
|
|
183
|
-
|
|
184
|
-
</distribution>
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
<!-- Priors on parameters -->
|
|
188
|
-
<!-- BDMMPrime parameters priors -->
|
|
189
|
-
|
|
190
|
-
<prior id="originBDMMPrimePrior" name="distribution" x="@originBDMMPrime">
|
|
94
|
+
<prior name="distribution" x="@processLength">
|
|
191
95
|
<LogNormal name="distr" M="-1.0" S="0.2"/>
|
|
192
96
|
</prior>
|
|
193
|
-
|
|
194
|
-
<!-- Reproductive number Prior -->
|
|
195
|
-
<distribution id="RePrior" spec="SmartZeroExcludingPrior" x="@ReValues">
|
|
97
|
+
<distribution spec="SmartZeroExcludingPrior" x="@Re">
|
|
196
98
|
<LogNormal name="distr" M="0.8" S="0.5"/>
|
|
197
99
|
</distribution>
|
|
198
|
-
|
|
199
|
-
<!-- Prior for sampling proportion for China -->
|
|
200
|
-
<distribution id="spChinaE2Prior" spec="SmartZeroExcludingPrior" x="@samplingProportionValues"
|
|
201
|
-
classesToExclude="1.2E-5 1.3E-5 1.4E-5 1.5E-5">
|
|
100
|
+
<distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.2E-5 1.3E-5 1.4E-5 1.5E-5">
|
|
202
101
|
<Uniform name="distr" lower="0" upper="0.15"/>
|
|
203
102
|
</distribution>
|
|
204
|
-
|
|
205
|
-
<distribution id="spFranceE1Prior" spec="SmartZeroExcludingPrior" x="@samplingProportionValues"
|
|
206
|
-
classesToExclude="1.1E-5 1.3E-5 1.4E-5 1.5E-5">
|
|
103
|
+
<distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.3E-5 1.4E-5 1.5E-5">
|
|
207
104
|
<Uniform name="distr" lower="0" upper="0.093"/>
|
|
208
105
|
</distribution>
|
|
209
|
-
|
|
210
|
-
<distribution id="spGermanyE1Prior" spec="SmartZeroExcludingPrior" x="@samplingProportionValues"
|
|
211
|
-
classesToExclude="1.1E-5 1.2E-5 1.4E-5 1.5E-5">
|
|
106
|
+
<distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.2E-5 1.4E-5 1.5E-5">
|
|
212
107
|
<Uniform name="distr" lower="0" upper="0.10"/>
|
|
213
108
|
</distribution>
|
|
214
|
-
|
|
215
|
-
<distribution id="spItalyE1Prior" spec="SmartZeroExcludingPrior" x="@samplingProportionValues"
|
|
216
|
-
classesToExclude="1.1E-5 1.2E-5 1.3E-5 1.5E-5">
|
|
109
|
+
<distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.2E-5 1.3E-5 1.5E-5">
|
|
217
110
|
<Uniform name="distr" lower="0" upper="0.005"/>
|
|
218
111
|
</distribution>
|
|
219
|
-
|
|
220
|
-
<distribution id="spOEE1Prior" spec="SmartZeroExcludingPrior" x="@samplingProportionValues"
|
|
221
|
-
classesToExclude="1.1E-5 1.2E-5 1.3E-5 1.4E-5">
|
|
112
|
+
<distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.2E-5 1.3E-5 1.4E-5">
|
|
222
113
|
<Uniform name="distr" lower="0" upper="0.057"/>
|
|
223
114
|
</distribution>
|
|
224
|
-
|
|
225
115
|
<plate var="n" range="$(layersRange)">
|
|
226
|
-
<prior name="distribution" x="@
|
|
116
|
+
<prior name="distribution" x="@migrationRateW$(n)">
|
|
227
117
|
<Normal name="distr" mean="0.0" sigma="1.0"/>
|
|
228
118
|
</prior>
|
|
229
119
|
</plate>
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
<Exponential name="distr">
|
|
233
|
-
<parameter spec="RealParameter" estimate="false" name="mean">0.5</parameter>
|
|
234
|
-
</Exponential>
|
|
120
|
+
<prior name="distribution" x="@gammaShape">
|
|
121
|
+
<Exponential name="distr" mean="0.5"/>
|
|
235
122
|
</prior>
|
|
236
|
-
|
|
237
123
|
<prior id="KappaPrior" name="distribution" x="@kappa">
|
|
238
|
-
<LogNormal name="distr"
|
|
239
|
-
<parameter spec="RealParameter" estimate="false" name="M">1.0</parameter>
|
|
240
|
-
<parameter spec="RealParameter" estimate="false" name="S">1.25</parameter>
|
|
241
|
-
</LogNormal>
|
|
124
|
+
<LogNormal name="distr" M="1.0" S="1.25"/>
|
|
242
125
|
</prior>
|
|
243
|
-
|
|
244
126
|
</distribution>
|
|
245
127
|
</distribution>
|
|
246
128
|
|
|
247
|
-
|
|
248
|
-
<operator
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
<operator
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
<operator
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
<operator
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
<operator id="BDMMPrimeWide" spec="Exchange" tree="@treeBDMMPrime"
|
|
261
|
-
isNarrow="false" weight="3.0"/>
|
|
262
|
-
|
|
263
|
-
<operator id="BDMMPrimeWilsonBalding" spec="WilsonBalding" tree="@treeBDMMPrime"
|
|
264
|
-
weight="3.0"/>
|
|
265
|
-
|
|
266
|
-
<operator id="BDMMPrimeBICEPSEpochTop" spec="EpochFlexOperator" tree="@treeBDMMPrime"
|
|
267
|
-
scaleFactor="0.1" weight="2.0"/>
|
|
268
|
-
|
|
269
|
-
<operator id="BDMMPrimeBICEPSEpochAll" spec="EpochFlexOperator" tree="@treeBDMMPrime"
|
|
270
|
-
fromOldestTipOnly="false" scaleFactor="0.1" weight="2.0"/>
|
|
271
|
-
|
|
272
|
-
<operator id="BDMMPrimeBICEPSTreeFlex" spec="TreeStretchOperator" tree="@treeBDMMPrime"
|
|
273
|
-
scaleFactor="0.01" weight="2.0"/>
|
|
274
|
-
|
|
275
|
-
<operator id="originBDMMPrimeScaler" spec="BactrianScaleOperator" parameter="@originBDMMPrime"
|
|
276
|
-
scaleFactor="0.25" weight="3.0" />
|
|
277
|
-
|
|
278
|
-
<operator id="ReScaler" spec="SmartScaleOperator" parameter="@ReValues" scaleFactor="0.25"
|
|
279
|
-
weight="10.0" />
|
|
280
|
-
|
|
281
|
-
<operator id="samplingProportionScaler" spec="SmartScaleOperator" parameter="@samplingProportionValues"
|
|
282
|
-
weight="3.0" />
|
|
283
|
-
|
|
129
|
+
<operator spec="BactrianScaleOperator" tree="@tree" rootOnly="true" scaleFactor="0.25" weight="5.0"/>
|
|
130
|
+
<operator spec="BactrianNodeOperator" tree="@tree" weight="30.0"/>
|
|
131
|
+
<operator spec="BactrianSubtreeSlide" tree="@tree" weight="15.0"/>
|
|
132
|
+
<operator spec="Exchange" tree="@tree" weight="15.0"/>
|
|
133
|
+
<operator spec="Exchange" tree="@tree" isNarrow="false" weight="3.0"/>
|
|
134
|
+
<operator spec="WilsonBalding" tree="@tree" weight="3.0"/>
|
|
135
|
+
<operator spec="EpochFlexOperator" tree="@tree" scaleFactor="0.1" weight="2.0"/>
|
|
136
|
+
<operator spec="EpochFlexOperator" tree="@tree" fromOldestTipOnly="false" scaleFactor="0.1" weight="2.0"/>
|
|
137
|
+
<operator spec="TreeStretchOperator" tree="@tree" scaleFactor="0.01" weight="2.0"/>
|
|
138
|
+
<operator spec="BactrianScaleOperator" parameter="@processLength" scaleFactor="0.25" weight="3.0"/>
|
|
139
|
+
<operator spec="SmartScaleOperator" parameter="@Re" scaleFactor="0.25" weight="10.0"/>
|
|
140
|
+
<operator spec="SmartScaleOperator" parameter="@samplingProportion" weight="3.0"/>
|
|
284
141
|
<plate var="n" range="$(layersRange)">
|
|
285
|
-
<operator spec="BactrianRandomWalkOperator" parameter="@
|
|
142
|
+
<operator spec="BactrianRandomWalkOperator" parameter="@migrationRateW$(n)" weight="5.0"/>
|
|
286
143
|
</plate>
|
|
144
|
+
<operator spec="BactrianScaleOperator" parameter="@gammaShape" weight="1.0"/>
|
|
145
|
+
<operator spec="BactrianScaleOperator" parameter="@kappa" weight="1.0"/>
|
|
287
146
|
|
|
288
|
-
<
|
|
289
|
-
weight="1.0"/>
|
|
290
|
-
|
|
291
|
-
<operator id="KappaScaler" spec="BactrianScaleOperator" parameter="@kappa"
|
|
292
|
-
weight="1.0"/>
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
<!-- Loggers -->
|
|
296
|
-
<logger id="tracelog" spec="Logger" fileName="$(filebase).log" logEvery="1000" model="@posterior" sanitiseHeaders="true" sort="smart">
|
|
297
|
-
<log idref="posterior"/>
|
|
298
|
-
<log idref="likelihood"/>
|
|
299
|
-
<log idref="prior"/>
|
|
300
|
-
<log idref="treeLikelihood"/>
|
|
301
|
-
<log idref="gammaShape"/>
|
|
302
|
-
<log idref="kappa"/>
|
|
303
|
-
<log id="TreeHeight" spec="TreeStatLogger" tree="@treeBDMMPrime"/>
|
|
304
|
-
<log id="typedTreeStats" spec="TypedTreeStatsLogger" includeRootEdge="true"
|
|
305
|
-
typeLabel="type" typeSet="@typeSetBDMMPrime">
|
|
306
|
-
<typedTree id="typeMappedTree" spec="TypeMappedTree" bdmmDistrib="@BDMMPrime" startTypePriorProbs="@typeFrequencies" mapOnInit="false" remapOnLog="true" typeLabel="type" typeTraitSet="@typeTraitSet" untypedTree="@treeBDMMPrime"/>
|
|
307
|
-
</log>
|
|
308
|
-
<log idref="originBDMMPrime"/>
|
|
309
|
-
<log idref="ReSV"/>
|
|
310
|
-
<log idref="becomeUninfectiousRateSV"/>
|
|
311
|
-
<log idref="samplingProportionSV"/>
|
|
312
|
-
<log idref="migrationRateSM"/>
|
|
313
|
-
|
|
314
|
-
<log idref="removalProbSV"/>
|
|
315
|
-
<log idref="typeFrequencies"/>
|
|
316
|
-
</logger>
|
|
317
|
-
|
|
318
|
-
<logger id="screenlog" spec="Logger" logEvery="1000">
|
|
147
|
+
<logger spec="Logger" fileName="MCMC.log" logEvery="1000" model="@posterior" sanitiseHeaders="true" sort="smart">
|
|
319
148
|
<log idref="posterior"/>
|
|
320
|
-
<log arg="@posterior" id="ESS_posterior" spec="util.ESS"/>
|
|
321
149
|
<log idref="likelihood"/>
|
|
322
|
-
<log arg="@likelihood" id="ESS_likelihood" spec="util.ESS"/>
|
|
323
150
|
<log idref="prior"/>
|
|
324
|
-
<log arg="@prior" id="ESS_prior" spec="util.ESS"/>
|
|
325
151
|
<log idref="BDMMPrime"/>
|
|
326
|
-
<log
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
<log
|
|
152
|
+
<log idref="gammaShape"/>
|
|
153
|
+
<log idref="kappa"/>
|
|
154
|
+
<log idref="processLength"/>
|
|
155
|
+
<log idref="ReSP"/>
|
|
156
|
+
<log idref="samplingProportionSP"/>
|
|
157
|
+
<log idref="migrationRateSP"/>
|
|
158
|
+
<log idref="migrationRate"/>
|
|
331
159
|
</logger>
|
|
332
|
-
|
|
333
|
-
<logger id="typedTreeLogger" spec="OptionalLogger" enableLogger="true"
|
|
334
|
-
fileName="$(filebase).typed.trees" logEvery="10000" mode="tree">
|
|
160
|
+
<logger spec="Logger" fileName="typedTrees.trees" logEvery="100000" mode="tree">
|
|
335
161
|
<log idref="typeMappedTree"/>
|
|
336
162
|
</logger>
|
|
337
|
-
<logger
|
|
338
|
-
|
|
339
|
-
<log id="nodeTypedTree" spec="TypedNodeTreeLogger" typedTree="@typeMappedTree"/>
|
|
163
|
+
<logger spec="Logger" fileName="TypedNodeTrees.trees" logEvery="100000" mode="tree">
|
|
164
|
+
<log spec="TypedNodeTreeLogger" typedTree="@typeMappedTree"/>
|
|
340
165
|
</logger>
|
|
341
|
-
<logger
|
|
342
|
-
<log
|
|
343
|
-
startTypePriorProbs="@typeFrequencies" typeMappedTree="@typeMappedTree" useTauLeaping="true"/>
|
|
166
|
+
<logger spec="Logger" fileName="trajectories.csv" logEvery="100000">
|
|
167
|
+
<log spec="SampledTrajectory" bdmmDistrib="@BDMMPrime" startTypePriorProbs="@startTypePriorProbs" typeMappedTree="@typeMappedTree" useTauLeaping="true"/>
|
|
344
168
|
</logger>
|
|
345
|
-
|
|
346
|
-
<operatorschedule id="OperatorSchedule" spec="OperatorSchedule"/>
|
|
347
|
-
|
|
348
169
|
</run>
|
|
349
|
-
|
|
350
170
|
</beast>
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import json
|
|
2
1
|
import os
|
|
3
2
|
from glob import glob
|
|
4
3
|
from pathlib import Path
|
|
@@ -21,23 +20,21 @@ def run_beast():
|
|
|
21
20
|
all_predictor_files = ",".join(glob(str(predictors_dir / "all" / "*.tsv")))
|
|
22
21
|
all_predictors_data = " ".join(
|
|
23
22
|
[
|
|
24
|
-
f"-D
|
|
25
|
-
f"-D
|
|
26
|
-
f"-D
|
|
23
|
+
f"-D msa_file={msa_file}",
|
|
24
|
+
f"-D changeTimesFile={predictors_dir / 'changetimes_all_7e.tsv'}",
|
|
25
|
+
f"-D predictorFiles={all_predictor_files}",
|
|
27
26
|
]
|
|
28
27
|
)
|
|
29
28
|
flight_predictor_data = " ".join(
|
|
30
29
|
[
|
|
31
|
-
f"-D
|
|
32
|
-
f"-D
|
|
33
|
-
f"-D
|
|
30
|
+
f"-D msa_file={msa_file}",
|
|
31
|
+
f"-D changeTimesFile={predictors_dir / 'changetimes_flights_4e.tsv'}",
|
|
32
|
+
f"-D predictorFiles={predictors_dir / 'flight_pop_x_4e_ls.tsv'}",
|
|
34
33
|
]
|
|
35
34
|
)
|
|
36
35
|
|
|
37
|
-
job_ids = {}
|
|
38
|
-
|
|
39
36
|
os.makedirs(output_dir / "Nonparametric", exist_ok=True)
|
|
40
|
-
|
|
37
|
+
submit_job(
|
|
41
38
|
" ".join(
|
|
42
39
|
[
|
|
43
40
|
os.environ["BELLA_RUN_BEAST_CMD"],
|
|
@@ -52,7 +49,7 @@ def run_beast():
|
|
|
52
49
|
)
|
|
53
50
|
|
|
54
51
|
os.makedirs(output_dir / "all-predictors-GLM", exist_ok=True)
|
|
55
|
-
|
|
52
|
+
submit_job(
|
|
56
53
|
" ".join(
|
|
57
54
|
[
|
|
58
55
|
os.environ["BELLA_RUN_BEAST_CMD"],
|
|
@@ -67,7 +64,7 @@ def run_beast():
|
|
|
67
64
|
)
|
|
68
65
|
|
|
69
66
|
os.makedirs(output_dir / "flights-GLM", exist_ok=True)
|
|
70
|
-
|
|
67
|
+
submit_job(
|
|
71
68
|
" ".join(
|
|
72
69
|
[
|
|
73
70
|
os.environ["BELLA_RUN_BEAST_CMD"],
|
|
@@ -82,7 +79,7 @@ def run_beast():
|
|
|
82
79
|
)
|
|
83
80
|
|
|
84
81
|
os.makedirs(output_dir / "all-predictors-MLP", exist_ok=True)
|
|
85
|
-
|
|
82
|
+
submit_job(
|
|
86
83
|
" ".join(
|
|
87
84
|
[
|
|
88
85
|
os.environ["BELLA_RUN_BEAST_CMD"],
|
|
@@ -98,7 +95,7 @@ def run_beast():
|
|
|
98
95
|
)
|
|
99
96
|
|
|
100
97
|
os.makedirs(output_dir / "flights-MLP", exist_ok=True)
|
|
101
|
-
|
|
98
|
+
submit_job(
|
|
102
99
|
" ".join(
|
|
103
100
|
[
|
|
104
101
|
os.environ["BELLA_RUN_BEAST_CMD"],
|
|
@@ -112,6 +109,3 @@ def run_beast():
|
|
|
112
109
|
cpus=128,
|
|
113
110
|
mem_per_cpu=12000,
|
|
114
111
|
)
|
|
115
|
-
|
|
116
|
-
with open(base_output_dir / "eucovid_job_ids.json", "w") as f:
|
|
117
|
-
json.dump(job_ids, f)
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
<run spec="MCMC" chainLength="10000000">
|
|
37
37
|
<state id="state">
|
|
38
38
|
<plate var="n" range="$(layersRange)">
|
|
39
|
-
<stateNode spec="RealParameter"
|
|
40
|
-
<stateNode spec="RealParameter"
|
|
39
|
+
<stateNode spec="RealParameter" id="birthRateW$(n)" value="0"/>
|
|
40
|
+
<stateNode spec="RealParameter" id="deathRateW$(n)" value="0"/>
|
|
41
41
|
</plate>
|
|
42
42
|
<stateNode spec="RealParameter" id="samplingRate" value="$(samplingRateInit)"/>
|
|
43
43
|
<stateNode spec="RealParameter" id="migrationRate" value="$(migrationRateInit)"/>
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import json
|
|
2
1
|
import os
|
|
3
2
|
from pathlib import Path
|
|
4
3
|
|
|
@@ -33,8 +32,9 @@ def run_beast():
|
|
|
33
32
|
time_predictor = " ".join(list(map(str, np.repeat(time_bins, len(types)))))
|
|
34
33
|
log10BM_predictor = " ".join(types * T)
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
for i, tree in enumerate(
|
|
36
|
+
tqdm(trees, desc="Submitting BEAST jobs for platyrrhine datasets")
|
|
37
|
+
):
|
|
38
38
|
process_length = max(get_node_depths(tree).values())
|
|
39
39
|
command = " ".join(
|
|
40
40
|
[
|
|
@@ -62,11 +62,8 @@ def run_beast():
|
|
|
62
62
|
str(Path(__file__).parent / "beast_config.xml"),
|
|
63
63
|
]
|
|
64
64
|
)
|
|
65
|
-
|
|
65
|
+
submit_job(
|
|
66
66
|
command,
|
|
67
67
|
Path(os.environ["BELLA_SBATCH_LOG_DIR"]) / "platyrrhine" / str(i),
|
|
68
68
|
mem_per_cpu=12000,
|
|
69
69
|
)
|
|
70
|
-
|
|
71
|
-
with open(base_output_dir / "platyrrhine_job_ids.json", "w") as f:
|
|
72
|
-
json.dump(job_ids, f)
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<run spec="MCMC" chainLength="10000000">
|
|
32
32
|
<state id="state">
|
|
33
33
|
<plate var="n" range="$(layersRange)">
|
|
34
|
-
<stateNode spec="RealParameter"
|
|
34
|
+
<stateNode spec="RealParameter" id="migrationRateW$(n)" value="0"/>
|
|
35
35
|
</plate>
|
|
36
36
|
</state>
|
|
37
37
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<run spec="MCMC" chainLength="10000000">
|
|
26
26
|
<state id="state">
|
|
27
27
|
<plate var="n" range="$(layersRange)">
|
|
28
|
-
<stateNode spec="RealParameter"
|
|
28
|
+
<stateNode spec="RealParameter" id="reproductionNumberW$(n)" value="0"/>
|
|
29
29
|
</plate>
|
|
30
30
|
</state>
|
|
31
31
|
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
<run spec="MCMC" chainLength="10000000">
|
|
30
30
|
<state id="state">
|
|
31
31
|
<plate var="n" range="$(layersRange)">
|
|
32
|
-
<stateNode spec="RealParameter"
|
|
33
|
-
<stateNode spec="RealParameter"
|
|
32
|
+
<stateNode spec="RealParameter" id="birthRateW$(n)" value="0"/>
|
|
33
|
+
<stateNode spec="RealParameter" id="deathRateW$(n)" value="0"/>
|
|
34
34
|
</plate>
|
|
35
35
|
</state>
|
|
36
36
|
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
<run spec="MCMC" chainLength="10000000">
|
|
24
24
|
<state id="state">
|
|
25
25
|
<plate var="n" range="$(layersRange)">
|
|
26
|
-
<stateNode spec="RealParameter"
|
|
27
|
-
<stateNode spec="RealParameter"
|
|
26
|
+
<stateNode spec="RealParameter" id="birthRateW$(n)" value="0"/>
|
|
27
|
+
<stateNode spec="RealParameter" id="deathRateW$(n)" value="0"/>
|
|
28
28
|
</plate>
|
|
29
29
|
</state>
|
|
30
30
|
|