Every codon s can be endowed with a single synonymous rate αs and two nonsynonymous rates:
(for terminal branches, or leaves) and
(for internal branches). If the latter two rates differ significantly, we deduce that evolution along internal branches (historical, e.g., influenced primarily by selection for transmission in HIV) and along terminal branches (recent, e.g., influenced by within-patient evolution in HIV) are subject to differing selective constraints. Formally,
 A straightforward modification of the null hypothesis can be used to test for non-neutral evolution only along internal branches of the tree:

 We refer to the latter test as IFEL (internal fixed effects likelihood). Significance is assessed by the likelihood ratio test with one degree of freedom. Our simulations (see simulation strategy details below) have shown that the use of the
asymptotic distribution leads to a conservative test, and actual false positive rates (in our simulation scenario) are lower than the nominal significance level of the test (Figure S7). For a given sample size, the power of the test depends on the divergence level and the disparity between levels of selection between internal and terminal branches. For example, at p = 0.05, the overall power of the test to detect non-neutral evolution is only 25%. This rather low number can be partially explained by a large proportion of codon sites with low degree of polymorphism. Such sites are nearly impossible to classify within the current phylogenetic framework. However, if we narrow our focus to strongly selected sites (i.e., sites where
) with an above average level of divergence (αs > 1), the power increases to 41%. For very strongly selected sites (K ≥ 16), the power is boosted to 68%. Overall, the PPV of the test is 98.8%.
Free full text: Click here