Infinite fitness problem in an inference framework

13 views
Skip to first unread message

jules romieu

unread,
Apr 29, 2026, 8:56:40 AMApr 29
to slim-discuss
Hello,

We have a few questions:

1) We are using SLiM to generate genetic data for making inferences. To do this, we are simulating a multi-population model (5 subpopulations) with beneficial mutations that can arise in each population due to a beneficial mutation rate. The problem is that we have a single migration event between just two subpopulations. The issue is that, as the other subpopulations are not in contact, the beneficial mutations that arise accumulate without becoming fixed in the general population. As we are working within an inference framework, this means we sometimes find ourselves in situations where there are numerous unfixed mutations, combined with a high selection coefficient, a large population size and a large number of generations, which leads to an infinite fitness value (>10**300).
We would like to know whether it is possible to calculate fitness additively rather than multiplicatively in SLiM? Or whether there are solutions in SLiM to manage this problem effectively?

2) To find a solution to this problem, another possible approach is to create a multi-species model to resolve the issue of mutations that cannot be fixed. But is it possible for individuals of different species to hybridise in SLiM?

Thank you in advance for your replies.

Kind regards,

Jules

Ben Haller

unread,
Apr 29, 2026, 9:11:38 AMApr 29
to slim-d...@googlegroups.com
Hi Jules!

No, at present there is no way to switch to additive fitness calculations (except to switch to a quantitative-genetics model; you can read about that in the manual, chapter 13, if you wish).

But I'd suggest that if you're overflowing to infinity, you are probably WAY outside the realm of biological realism, and you should probably re-examine your distribution of fitness effects and other parameters.  If a mutation is literally lethal in one of the two populations, then that ought to be modeled as a fitness effect of 0.0 in that population, and some fitness effect near 1.0 in the other population; that won't cause any overflow issues.  Short of total lethality, it is hard to imagine any biological scenario where a fitness difference of > 10**300 between environments for a given individuals makes any sense.

No, individuals of different species can't hybridize in SLiM, sorry; that's the definition of "species" as far as SLiM is concerned, if you want hybridization to be possible then, according to SLiM's meaning of "species", they are the same species by definition.

So, if you really want this to work as presently parameterized I'd suggest looking into modeling it with quantitative genetics, which would allow an additive approach.  But I suspect you need to use different and more biologically realistic parameters; infinite fitness is generally a symptom of something else being wrong in the model.

Good luck, and happy modeling!

Cheers,
-B.

Benjamin C. Haller
Messer Lab
Cornell University
--
SLiM forward genetic simulation: http://messerlab.org/slim/
---
You received this message because you are subscribed to the Google Groups "slim-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slim-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/slim-discuss/084fcf82-0033-42b7-bafd-e0b4dcc40e97n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages