I am trying to do some simulations involving epistasis. I simulate epistasis using the mutationEffect() callback by scaling the fitness of the individual by a constant if both the interacting loci are present in that individual.
I want to show that under an additive scenario, (without epistasis) the selection response of two populations with same genetic variants is equal irrespective of the initial frequencies of the allele. Whereas under epistasis that won't be the case.
e.g. I simulate two populations of N=1000 each. Both populations have two identical targets of selection (s=0.05) each. In one population the alleles start at 0.33 frequency whereas in the other they start at 0.67. After 10 generations of evolution I estimate the selection responses, by calculating the "rate of logit frequency change (realised selection coefficient)". Under the additive scenario, these responses are equal between two populations for a given locus. Whereas with added epistasis, there is significant difference observed. (I simulate this for an entire chromosome, X as well as autosome with flat recombination rate of 1e-8, and mutation rate of 0.0)
Since effect of epistasis will also depend on the distance between the two loci, I also did simulations by keeping one locus fixed and increasing the distance between the two loci by changing the locus 2 positions.
If, both the loci are very close, such that the recombination can not break them apart, they can be thought of as behaving as one locus, and hence the response should match the additivity assumption. However, even in the case when the 2 loci were only one base pair apart I observed a difference in the selection response of the given target between the two populations. Also, as I reduce the epistasis i.e the fitness scaling I see that this difference also minimises, and under additivity the target again shows equal response across populations.
Why is that the case?
Is it because, SLiM will always consider both the targets different if they are at different positions, and hence the effect of epistasis is still observed?
Or is it because the epistasis affects males and females differently and the method of estimating selection doesn't take into account these differences?