imasterRafa / phyml

Automatically exported from code.google.com/p/phyml
GNU General Public License v2.0
0 stars 0 forks source link

Updated partials are not used #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Recall that PhyML stores partials on the branches. Tip partials are thus stored 
on the branch leading to the tip.

For the above Tree here ( http://imgur.com/ZQZJgg3) PhyML executes the 
following partial likelihood updates:

#Step1
Updating partials on Branch 2 (on the side where Node 5 lies)
Left partials 
:[0,0,1,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,1,
0,]
Right 
partials:[0,0,1,0,1,0,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,1,0,
0,0,0,1,0,]
Updated 
partials:[0.001036,0.001036,0.814992,0.001036,0.814992,0.001036,0.001036,0.00103
6,0.001036,0.814992,0.001036]
- PhyML used the partials on Branch 0 and Branch 1. 

#Step2
Updating partials on Branch 5 (on the side where Node 6 lies)
Left partials 
:[0.001036,0.001036,0.814992,0.001036,0.814992,0.001036,0.001036,0.001036,0.0010
36,0.814992,0.001036]
Right 
partials:[1,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,1,0,1,0,
0,0,0,1,0,]
Updated 
partials:[0.068279,0.001565,0.012852,0.001565,0.560619,0.001565,0.001565,0.00156
5,0.001565,0.560619,0.001565]
- PhyML used the partials on Branch 2(left) and Branch 3(right).
- Observe that the updated Branch 2 partials were used. Good.

#Step3
Updating partials on Branch 4 (on the side where Node 7 lies)
Left partials 
:[0.068279,0.001565,0.012852,0.001565,0.560619,0.001565,0.001565,0.001565,0.0015
65,0.560619,0.001565]
Right 
partials:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,1,0,
0,0,0,1,0,]
Updated 
partials:[0.045978,0.000367,0.001180,0.000367,0.042061,0.016208,0.001822,0.00182
2,0.001822,0.042061,0.016208]
- PhyML used the partials on Branch 5(left) and Branch 6(right). 
- Observe that the updated Branch 5 partials were used. Good.

#Step4
Updating partials on Branch 5 (on the side where Node 7 lies)
Left partials 
:[1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,1,0,1,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,1,
0,]
Right 
partials:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,1,0,
0,0,0,1,0,]
Updated 
partials:[0.725711,0.000827,0.000827,0.000827,0.081592,0.007356,0.000827,0.00082
7,0.000827,0.000827,0.725711]
- PhyML used the partials on Branch 6(left) and Branch 4(right). 

#Step5
Updating partials on Branch 2 (on the side where Node 6 lies)
Left partials 
:[0.725711,0.000827,0.000827,0.000827,0.081592,0.007356,0.000827,0.000827,0.0008
27,0.000827,0.72571]
Right 
partials:[1,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,1,0,1,0,
0,0,0,1,0,]
Updated 
partials:[0.605822,0.000577,0.000577,0.000577,0.068407,0.000205,0.000085,0.00008
5,0.000577,0.025171,0.013888]
- PhyML used the partials on Branch 5(left) and Branch 3(right). 
- Observe that the updated Branch 5 partials were used. Good.

#Step6
Updating partials on Branch 0 (on the side where Node 5 lies)
Left partials 
:[0.605822,0.000577,0.000577,0.000577,0.068407,0.000205,0.000085,0.000085,0.0005
77,0.025171,0.013888]
Right 
partials:[0,0,1,0,1,0,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,1,0,
0,0,0,1,0,]
Updated 
partials:[0.012834,0.001558,0.049395,0.001558,0.045954,0.000179,0.000177,0.00017
7,0.000113,0.018112,0.000361]
- PhyML used the partials on Branch 2(left) and Branch 1(right).
- Observe that the updated Branch 2 partials were used. Good.

#Step7
Updating partials on Branch 1 (on the side where Node 5 lies)
Left partials 
:[0.605822,0.000577,0.000577,0.000577,0.068407,0.000205,0.000085,0.000085,0.0005
77,0.025171,0.013888]
Right 
partials:[0,0,1,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0,1,0,1,0,
0,0,0,1,0,]
Updated 
partials:[0.016015,0.001944,0.048237,0.001944,0.044876,0.000223,0.000221,0.00022
1,0.000141,0.017687,0.000451]
- PhyML used the partials on Branch 2(left) and Branch 0(right).
- Observe that the updated Branch 2 partials were used. Good.

#Step8
Updating partials on Branch 3 (on the side where Node 6 lies)
Left partials 
:[0.725711,0.000827,0.000827,0.000827,0.081592,0.007356,0.000827,0.000827,0.0008
27,0.000827,0.725711]
Right 
partials:[0.001036,0.001036,0.814992,0.001036,0.814992,0.001036,0.001036,0.00103
6,0.001036,0.814992,0.001036]
Updated 
partials:[0.047250,0.001963,0.016119,0.001963,0.043807,0.000697,0.000290,0.00029
0,0.001963,0.016119,0.047250]
- PhyML used the partials on Branch 5(left) and Branch 2(right).
- Observe that the updated Branch 5 partials were used. Good.
- Observe that the updated Branch 2 partials were NOT used. Instead, the 
partials from Step1 were used, why?

#Step9
Updating partials on Branch 6 (on the side where Node 7 lies)
Left partials 
:[1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,1,0,1,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,1,
0,]
Right 
partials:[0.068279,0.001565,0.012852,0.001565,0.560619,0.001565,0.001565,0.00156
5,0.001565,0.560619,0.001565]
Updated 
partials:[0.059672,0.000043,0.000138,0.000043,0.485526,0.000213,0.000213,0.00021
3,0.000213,0.004922,0.021035]
- PhyML used the partials on Branch 4(left) and Branch 5(right).
- Observe that the updated Branch 5 partials were NOT used. Instead, the 
partials from Step2 were used, why?

The above can be recreated by the command:
./src/phyml-beagle -i ./datasets/toy.txt -d nt -q -c 1 -v 0 -t e -m JC69 -f 
'0.25,0.25,0.25,0.25' -o none -b 0 --r_seed 1999

Original issue reported on code.google.com by imran.fa...@gmail.com on 30 Jun 2013 at 5:09

Attachments:

GoogleCodeExporter commented 8 years ago
BTW, I have truncated the "Updated partials" list above for readability 
reasons. 

Original comment by imran.fa...@gmail.com on 30 Jun 2013 at 5:14

GoogleCodeExporter commented 8 years ago
Fixed.

Original comment by imran.fa...@gmail.com on 19 Jul 2013 at 11:40