Repeatability of evolution on epistatic landscapes

Evolution is a dynamic process. The two classical forces of evolution are mutation and selection. Assuming small mutation rates, evolution can be predicted based solely on the fitness differences between phenotypes. Predicting an evolutionary process under varying mutation rates as well as varying fitness is still an open question. Experimental procedures, however, do include these complexities along with fluctuating population sizes and stochastic events such as extinctions. We investigate the mutational path probabilities of systems having epistatic effects on both fitness and mutation rates using a theoretical and computational framework. In contrast to previous models, we do not limit ourselves to the typical strong selection, weak mutation (SSWM)-regime or to fixed population sizes. Rather we allow epistatic interactions to also affect mutation rates. This can lead to qualitatively non-trivial dynamics. Pathways, that are negligible in the SSWM-regime, can overcome fitness valleys and become accessible. This finding has the potential to extend the traditional predictions based on the SSWM foundation and bring us closer to what is observed in experimental systems.

In the main text we considered only the case where each individual has to die or divide in every time step. Here we relax this assumption and consider a more realistic scenario where only some individuals proliferate or die, whereas others do not take any action at all (Fig. A.1). Then, the probability generating functions for the four types: wild type, individuals with mutation A, individuals with mutation B, and individuals with both mutations are defined as f ab (s ab , s Ab , s aB , s AB ) = d ab + (1 − b ab − d ab )s ab + b ab ((1 − µ A − µ B )s ab + µ A s Ab + µ B s aB ) 2 , f Ab (s ab , s Ab , s aB , s AB ) = d Ab The functions are similar to the scenario of binary splitting (cf. Eq. 8 in the main text). There is only one term added: Ab, aB, AB} which denotes the case of the individual neither dividing nor dying. To make the model even more realistic one could also If the fitness landscape is rugged, i.e. having multiple local optima, they would be inaccessible Note, that without back mutations the extinction probability reduces to e AB = d AB b AB as in 13 the main text.
14 2. Until some t max calculate recursively  3. The probability to get the final, successful AB mutant, i.e. an individual that produces a lineage that does not die out again, exactly at time t is where N is the number of individuals in the beginning. Calculating this for all t ∈ 20 {0, . . . , t max } we obtain the time distribution.

21
Here, we explain the computation of the probability distribution of the pathway via type Ab 23 exemplarily. Allowing back mutations it is unclear how to specify different mutational pathways.

24
For instance for the pathway ab → aB → ab → Ab → AB it is obscure to say via which type Let Ab(t) (aB(t)) denote the random variable, that there is an AB mutant until time t via pathway Ab (aB). Thus, ¬Ab(t) corresponds to the random variable, that there is no AB mutant until time t vial pathway Ab. Then the probability, that the first mutant arises exactly at time t via pathway Ab (i.e. not via pathway aB beforehand) is The first term is calculated by the pgf as in Eq. (A.1). For the second term however, the time points for the different pathways are different. Let us derive a recursive function for this second term at this point. To do so, let us first consider the extinction probability for the subprocess of Ab → AB, where the process starts with one Ab individual. As discussed previously, this extinction probability within t − 1 time steps can be recursively calculated by its probability generating function Similarly, the extinction probability for the subprocess aB → AB within t − 2 time steps can be calculated recursively using the probability generating function for aB ating function, here the probability generating function for type aB has one time step less, which 31 agrees with the second term in A.6. To not confuse this modified probability generating function 32 with the common one, we use the bar-notation. Again, no probability generating function for 33 the AB-type is necessary, since the actual extinction probability for this type is used. 34 We define this recursive function as ab (s ab , s Ab , s aB , s AB ) :=f (Ab) (t). (A.10) The index Ab denotes, that this is the modified probability generating function for the pathway 35 via Ab.

36
With this we now describe the algorithm for the path probability.
Note, that the only difference is that the probability 41 generating function of types not along the pathway considered is one time step behind 42 (marked in red). This is also the reason, why there are two initial conditions needed for 43 type aB.