stephaneguindon / phyml

PhyML -- Phylogenetic estimation using (Maximum) Likelihood
GNU General Public License v3.0
175 stars 61 forks source link

A basic question about EX2 model #196

Closed evolbeginner closed 1 month ago

evolbeginner commented 1 month ago

Hi Stéphan,

First I'd like to thank you for your great efforts in developing and maintaining phyml. Could i ask a simple question about the EX2 mixture model? In brief, i'd like to confirm with you if there is a single parameter to estimate for EX2.

I see EX2 is implemented in both phyml and iqtree. In iqtree, it's given in the following format: image

In atgc, it's given at http://www.atgc-montpellier.fr/phyml/structure/data/EX.htm image

As i understand, the ratio of the relative rate of the above 2 mixtures is fixed as r_2/r_1 = 1.6413466609931/0.672020808818762 = 1.360/0.557 = 2.44 where r_1 and r_2 indicate the relative rate of Bur and Exp respectively. If I am not mistaken, then we have

$$ w_1 + w_2 = 1 $$

$$ w_1 \cdot r_1 + w_2 \cdot r_2 = 1 $$

$$ \frac{r_2}{r_1} = 2.44 $$

So, 4 unknowns with 3 equations, thus one to estimate. The above is consistent with the # of parameters = branch_# + 1. Similarly, for EX3 there are 6-4=2 free params.

Would you pls mind letting me know if the above makes sense? Any help is highly appreciated. Many thanks!

best, sishuo

stephaneguindon commented 1 month ago

Dear Sishuo, I did not design the EX2 model and the best would be to go back to the original article describing it. But from what I can see, two rate matrices are provided (one built from the analysis of buried sites and one from exposed), so that the ratio of 2.44 you are mentioning here is already built into them (i.e., this ratio is not an explicit parameter which value is fixed to 2.44). But you are correct that, besides edge lengths, one only estimates a single parameter here, Pc. As for EX3, I am not quite sure I understand what this model corresponds to (a mixture of "buried" + "exposed" + "what else?") so I'm afraid I can't really help here. Best regards, -Stéphane-

evolbeginner commented 1 month ago

Dear Stéphane,

Thank you much! I think it solved the problem. EX3 consists of hexposed, buried, and intermediate. I have written a blog post. I attach the data used in the test mentioned in the blog post here ex2.zip so that anyone that is interested can access and verify it by themselves. i am closing this issue post. many thx!

cheers, sishuo