You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To be able to make `.xml`'s for MultiTypeTree, we have to load the MultiTypeTree template `File > Template > MultiTypeTree`. This template allows to specify additional things, such as sampling location, which one can not specify using the standard interface, as well as parameters such as the migration rates.
95
-
After setting the template, we can load the alignment of the H3N2 data `File > Add Alignment`.
96
-
Since the sequences were sampled through time, we have to specify the sampling dates. These are included in the sequence names. To set the sampling dates, go to **Tip Dates**, guess them by splitting after the "_" and then choose the last group. There are two different ways in how BEAST can interpret sampling dates. They are labeled as **Since some time in the past** and **Before the present**. The easiest way to check if you have used the correct one is by checking `Height`. If the setup is correct, the sequences sampled the most recently (i.e. 2005.66) should have a Height of 0 while all other tips should be larger then 0 (Figure [2](#fig:sampling_dates)).
100
+
To be able to make `.xml`'s for MultiTypeTree, we have to load the MultiTypeTree template.
101
+
102
+
> At the top menu in BEAUTi select **File > Template > MultiTypeTree**.
103
+
104
+
This template allows to specify additional things, such as sampling location, which one can not specify using the standard interface, as well as parameters such as the migration rates.
105
+
After setting the template, we can load the alignment of the H3N2 data.
106
+
107
+
> At the top menu in BEAUti select **File > Add Alignment**.
108
+
> Navigate to the location where you have saved the file **h3n2_2deme.fna**.
109
+
> Select the file and click **OK**.
110
+
111
+
Since the sequences were sampled through time, we have to specify the sampling dates. These are included in the sequence names.
112
+
113
+
> Switch to **Tip Dates** tab.
114
+
> Check the **Use tip dates** checkbox.
115
+
> Click **Auto-configure**.
116
+
> Select **use everything > after last** and leave symbol as **"_"**.
117
+
118
+
There are two different ways in how BEAST can interpret sampling dates. They are labeled as **Since some time in the past** and **Before the present**. The easiest way to check if you have used the correct one is by checking `Height`. If the setup is correct, the sequences sampled the most recently (i.e. 2005.66) should have a Height of 0 while all other tips should be larger then 0 (Figure [2](#fig:sampling_dates)).
97
119
98
120
<figure>
99
121
<a id="fig:sampling_dates"></a>
@@ -103,7 +125,13 @@ Since the sequences were sampled through time, we have to specify the sampling d
103
125
<br>
104
126
105
127
106
-
The main contrast in the setup to previous analyses is that we include additional information about the sampling location of sequences. Sequences were taken from patients in Hong Kong and New Zealand. We can specify these sampling locations by going to **Tip Locations** in BEAUti and guessing the locations. Use here the second group after splitting the names on the character "_". After guessing the tip locations, the column **Location** should contain the entries Hong Kong and New Zealand (Figure [3](#fig:sampling_locations)).
128
+
Since out population structure is defined geographically, we include additional information about the sampling location of sequences. Sequences were taken from patients in Hong Kong and New Zealand. We can specify these sampling locations:
129
+
130
+
> Switch to **Tip Locations** tab in BEAUti
131
+
> Select **Guess**
132
+
> Select **split on character", leave the character as "_" and take group 2
133
+
134
+
After guessing the tip locations, the column **Location** should contain the entries Hong Kong and New Zealand (Figure [3](#fig:sampling_locations)).
107
135
108
136
<figure>
109
137
<a id="fig:sampling_locations"></a>
@@ -115,7 +143,12 @@ The main contrast in the setup to previous analyses is that we include additiona
115
143
116
144
For this analysis, we will be using the HKY model. The HKY model infers different rates for transversion and transition. Transition being the change within purines (**A** and **G**) and pyrimidines (**T** and **C**) and transversion being the change among those groups.
117
145
118
-
We also want to allow for heterogeneity between sites, which we can do by setting the **Gamma Category Count** to a value greater than 0 (normally between 4 and 6) and ticking the **estimate** box for the shape parameter (Figure [4](#fig:hky)).
146
+
We also want to allow for heterogeneity between sites, which we can do by setting the **Gamma Category Count** to a value greater than 0 (normally between 4 and 6) and estimating the shape parameter (Figure [4](#fig:hky)).
147
+
148
+
> Switch to **Site Model** tab in BEAUTi.
149
+
> Set **Gamma Category Count** to 4, leave **Shape** as 1.0 and **estimate** checkbox selected.
150
+
> Select **HKY** as **Subst Model**, make sure **estimate** checkbox is selected.
151
+
119
152
120
153
<figure>
121
154
<a id="fig:hky"></a>
@@ -128,11 +161,17 @@ We also want to allow for heterogeneity between sites, which we can do by settin
128
161
129
162
To speed up convergence, we leave the branch model on the Strict Clock model and set a different value for the clock rate (default is 1). A value of 0.005 substitutions * site^(-1) * year^(-1) is closer to the truth.
130
163
164
+
> Switch to **Clock Model** tab in BEAUTi
165
+
> set value as 0.005
166
+
131
167
132
168
Since we have more than one deme (Hong Kong and New Zealand), we can estimate the effective population size of those two demes separately. Additionally, these demes are connected, so we can (or need to) allow for migration between them.
133
-
By default, the migration rates and population sizes are not estimated. To change this, we have to go to the Priors setting. There, we have to check the two **estimate** boxes for the population sizes and the migration rates.
169
+
By default, the migration rates and population sizes are not estimated, we will change this.
134
170
135
-
171
+
> Switch to **Priors** tab in BEAUTi
172
+
> Expand **structuredCoalescent** line.
173
+
> Check the two boxes for the **estimate pop. sizes** and **estimate mig. rates**.
174
+
> Now two more parameter priors appear. For **rateMatrix** select **Exponential** prior.
136
175
137
176
138
177
After checking those two boxes, there will be two new fields appearing, where we can set the priors for the population sizes and the migration rates.
@@ -149,7 +188,10 @@ Figure [5](#fig:est_migrates) shows the final setup for the priors.
149
188
150
189
151
190
152
-
The rest of the settings we can leave as they are.
191
+
The rest of the settings we can leave as they are. Save your XML in order to run in BEAST2.
192
+
193
+
> In BEAUTi top menu, select **File > save** and choose your preferred location.
194
+
> Launch BEAST2 and use the saved XML to start the run.
153
195
154
196
After saving, we get an `*.xml`, which we can use in BEAST2. The run will take a bit of time. If the MultiTypeTree run consumes too much CPU power, you can just close it and then use the "pre-cooked" `*.log` and `*.trees` files later instead.
155
197
@@ -163,7 +205,7 @@ Next, we can have a look at the estimates of the effective population sizes (Fig
0 commit comments