example 4.1ΒΆ

This is example 4.1 in Molecular Evolution: A Statistical Approach, section 4.2.2.1, page 105.

The stochastic process is called K80 whose state space is {T, C, A, G} which we will encode as {0, 1, 2, 3}. The example uses \(\kappa = 2\), but with a slightly different parameterization of the rate matrix, so all rates in this example are scaled by 0.25 relative to the parameterization on Wikipedia.

 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
{
	"scene" : {
		"node_count" : 9,
		"process_count" : 1,
		"state_space_shape" : [4],
		"tree" : {
			"row_nodes" : [7, 7, 6, 8, 8, 0, 6, 0],
			"column_nodes" : [1, 2, 3, 4, 5, 6, 7, 8],
			"edge_rate_scaling_factors" : [
				0.2, 0.2, 0.2, 0.2, 0.2, 0.1, 0.1, 0.1],
			"edge_processes" : [0, 0, 0, 0, 0, 0, 0, 0]
		},
		"root_prior" : {
			"states" : [[0], [1], [2], [3]],
			"probabilities" : [0.25, 0.25, 0.25, 0.25]
		},
		"process_definitions" : [{
			"row_states" : [
				[0], [0], [0],
				[1], [1], [1],
				[2], [2], [2],
				[3], [3], [3]],
			"column_states" : [
				[1], [2], [3],
				[0], [2], [3],
				[0], [1], [3],
				[0], [1], [2]],
			"transition_rates" : [
				0.50, 0.25, 0.25,
				0.50, 0.25, 0.25,
				0.25, 0.25, 0.50,
				0.25, 0.25, 0.50
				]
		}],
		"observed_data" : {
			"nodes" : [1, 2, 3, 4, 5],
			"variables" : [0, 0, 0, 0, 0],
			"iid_observations" : [[0, 1, 2, 1, 1]]
		}
	},
	"requests" : [{"property" : "SNNLOGL"}]
}
1
2
3
4
{
	"status": "feasible",
	"responses": [-7.5814075725577]
}