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
For this tutorial we'll assume we know the host and parasite phylogenies without error. Note that our host repertoire inference method uses a root branch length to estimate the stationary probabilities at the root node. Our parasite tree file (`Nymphalini.phy`) is modified to have a branch length assigned to the root node. If you provide a tree without a root branch length, the software will consider it to be the same length as the tree height.
132
-
132
+
{% snippet scripts/run_nymphalini.Rev %}
133
133
phy_parasite <- readTrees(phy_parasite_fn)[1]
134
-
134
+
{% endsnippet %}
135
135
Here is where you can change the host tree to `angio_25tips_bl1.phy` when you repeat the analysis
We need to create vectors of *moves* and *monitors* to later inform how our Markov chain Monte Carlo (MCMC) analysis needs to propose and sample new model parameters and host repertoire histories. Also, we use monitors to record the information we want to use
152
-
152
+
{% snippet scripts/run_nymphalini.Rev %}
153
153
moves = VectorMoves()
154
154
monitors = VectorMonitors()
155
-
155
+
{% endsnippet %}
156
156
Next, we'll build the transition rate matrix for the model. In this example, the rate matrix requires four rates: two gain rates (0->1 and 1->2) and two loss rates (1->0 and 2->1).
157
157
158
158
First, create a vector containing all transition rates and assign it a move
We then construct a rate matrix for three states (0: non-host, 1: potential host, 2: actual host) using our vector of named rates. We found that the MCMC mixes better when the Q matrix is not rescaled such that the expected number of events per unit time per character is 1 (`rescaled=false`). This might not be true for every data set and you can always change it to `rescaled=true`.
0 commit comments