-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy paththorney_beast.xml
232 lines (181 loc) · 7.18 KB
/
thorney_beast.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<?xml version="1.0" standalone="yes"?>
<!-- Generated by BEAUTi v1.10.4 Prerelease #bc6cbd9 -->
<!-- by Alexei J. Drummond, Andrew Rambaut and Marc A. Suchard -->
<!-- Department of Computer Science, University of Auckland and -->
<!-- Institute of Evolutionary Biology, University of Edinburgh -->
<!-- David Geffen School of Medicine, University of California, Los Angeles-->
<!-- http://beast.community/ -->
<beast version="1.10.4">
<!-- The list of taxa to be analysed (can also include dates/ages). -->
<!-- ntaXX -->
<taxa id="taxa">
<!-- taxon block here -->
</taxa>
<!-- This is a simple constant population size coalescent model -->
<!-- that is used to generate an initial tree for the chain. -->
<constantSize id="constant" units="years">
<populationSize>
<parameter id="popSize" value="0.1"/>
</populationSize>
</constantSize>
<newick id="startingTree" usingDates="true">
<!-- newick string of time-scaled tree from treetime. Used to reduce burn-in, not compulsory but advised -->
<!-- it's best to have resolved polytomies here [mostly applicable for SARS-CoV-2] -->
</newick>
<newick id="dataTree" usingDates="false" usingHeights="true">
<!-- ML tree of topology that will be scaled here. MUST be same topology as above. -->
<!-- If you provide treetime with the alignment, it will re-estimate parameters so could result in slightly different topogies to IQTree. See SOP for further info-->
</newick>
<!-- NEW This treemodel wraps a treemodel and provides access to subtrees defined by the constraints tree-->
<!-- This model would throw an error if its topology was changed directly, but its subtrees can be operated on-->
<constrainedTreeModel id = "treeModel">
<tree idref="startingTree"/>
<constraintsTree>
<tree idref="dataTree"/>
</constraintsTree>
</constrainedTreeModel>
<!-- Statistic for root height of the tree -->
<treeHeightStatistic id="treeModel.rootHeight">
<treeModel idref="treeModel"/>
</treeHeightStatistic>
<!-- Statistic for sum of the branch lengths of the tree (tree length) -->
<treeLengthStatistic id="treeLength">
<treeModel idref="treeModel"/>
</treeLengthStatistic>
<!-- Statistic for time of most recent common ancestor of tree -->
<tmrcaStatistic id="age(root)" absolute="true">
<treeModel idref="treeModel"/>
</tmrcaStatistic>
<gmrfSkyGridLikelihood id="skygrid">
<populationSizes>
<!-- skygrid.logPopSize is in log units unlike other popSize -->
<parameter id="skygrid.logPopSize" dimension="24" value="0"/>
</populationSizes>
<precisionParameter>
<parameter id="skygrid.precision" value="0.1" lower="0.0"/>
</precisionParameter>
<numGridPoints>
<parameter id="skygrid.numGridPoints" value="23.0"/>
</numGridPoints>
<cutOff>
<parameter id="skygrid.cutOff" value="0.5"/>
</cutOff>
<intervals>
<bigFastTreeIntervals>
<treeModel idref="treeModel"/>
</bigFastTreeIntervals>
</intervals>
</gmrfSkyGridLikelihood>
<thorneyTreeLikelihood id="treeLikelihood">
<treeModel idref="treeModel"/>
<strictClockBranchLengthLikelihood id="branchLengthLikelihood" scale="29903.0">
<parameter id="clock.rate" value="0.0008" lower="0.0"/>
</strictClockBranchLengthLikelihood>
<constrainedBranchLengthProvider scale="29903.0" discrete="true" minBranchlength="0.0">
<treeModel idref="treeModel"/>
<dataTree>
<tree idref="dataTree"/>
</dataTree>
</constrainedBranchLengthProvider>
</thorneyTreeLikelihood>
<!-- Define operators -->
<operators id="operators" optimizationSchedule="log">
<nodeHeightOperator type="uniform" weight="1000">
<treeModel idref="treeModel"/>
</nodeHeightOperator>
<nodeHeightOperator type="scaleRoot" weight="100" scaleFactor="0.75" >
<treeModel idref="treeModel"/>
</nodeHeightOperator>
<uniformSubtreePruneRegraft weight="500">
<treeModel idref="treeModel"/>
</uniformSubtreePruneRegraft>
<narrowExchange weight="500">
<treeModel idref="treeModel"/>
</narrowExchange>
<wideExchange weight="500">
<treeModel idref="treeModel"/>
</wideExchange>
<wilsonBalding weight="500">
<treeModel idref="treeModel"/>
</wilsonBalding>
<gmrfSkygridBlockUpdateOperator scaleFactor="1.1" weight="100">
<gmrfSkygridLikelihood idref="skygrid"/>
</gmrfSkygridBlockUpdateOperator>
<scaleOperator scaleFactor="0.75" weight="1">
<parameter idref="skygrid.precision"/>
</scaleOperator>
<randomWalkOperator windowSize="1.0" weight="1">
<parameter idref="skygrid.logPopSize"/>
</randomWalkOperator>
</operators>
<!-- Define MCMC -->
<mcmc id="mcmc" chainLength="100000000" autoOptimize="true" operatorAnalysis="thorney.ops">
<joint id="joint">
<prior id="prior">
<gammaPrior shape="0.001" scale="1000.0" offset="0.0">
<parameter idref="skygrid.precision"/>
</gammaPrior>
<!--
<gammaPrior shape="0.001" scale="1000.0" offset="0.0">
<parameter idref="clock.rate"/>
</gammaPrior>
-->
<gmrfSkyGridLikelihood idref="skygrid"/>
</prior>
<likelihood id="likelihood">
<thorneyTreeLikelihood idref="treeLikelihood"/>
</likelihood>
</joint>
<operators idref="operators"/>
<!-- write log to screen -->
<log id="screenLog" logEvery="10000">
<column label="Joint" dp="4" width="12">
<joint idref="joint"/>
</column>
<column label="Prior" dp="4" width="12">
<prior idref="prior"/>
</column>
<column label="Likelihood" dp="4" width="12">
<likelihood idref="likelihood"/>
</column>
<column label="age(root)" sf="6" width="12">
<tmrcaStatistic idref="age(root)"/>
</column>
<!--
<column label="clock.rate" sf="6" width="12">
<parameter idref="clock.rate"/>
</column>
-->
<column label="tree_len" sf='6' width='12'>
<parameter idref="treeLength"/>
</column>
</log>
<!-- write log to file -->
<log id="fileLog" logEvery="10000" fileName="thorney.log" overwrite="false">
<joint idref="joint"/>
<prior idref="prior"/>
<likelihood idref="likelihood"/>
<parameter idref="treeModel.rootHeight"/>
<tmrcaStatistic idref="age(root)"/>
<treeLengthStatistic idref="treeLength"/>
<parameter idref="skygrid.precision"/>
<parameter idref="skygrid.logPopSize"/>
<parameter idref="skygrid.cutOff"/>
<!--
<parameter idref="clock.rate"/>
-->
<thorneyTreeLikelihood idref="treeLikelihood"/>
<gmrfSkyGridLikelihood idref="skygrid"/>
</log>
<!-- write tree log to file -->
<logTree id="treeFileLog" logEvery="10000" nexusFormat="true" fileName="thorney.trees" sortTranslationTable="true">
<treeModel idref="treeModel"/>
<joint idref="joint"/>
</logTree>
</mcmc>
<report>
<property name="timer">
<mcmc idref="mcmc"/>
</property>
</report>
</beast>