Default fitness formula

59 views
Skip to first unread message

Zuxi Cui

unread,
Sep 20, 2022, 2:40:11 PM9/20/22
to slim-discuss
Hi there,

I have a quick question.
What is the default fitness formula slim uses to select to kill in the non-WF model?

Thanks,
Terry

Peter Ralph

unread,
Sep 20, 2022, 3:11:00 PM9/20/22
to Zuxi Cui, slim-discuss
Hi, Terry - in a nonWF model, "fitness" is equal to the probability of survival. You'll find this discussed in the nonWF section of the manual (which is very readable).

--peter

From: slim-d...@googlegroups.com <slim-d...@googlegroups.com> on behalf of Zuxi Cui <zxc...@case.edu>
Sent: Tuesday, September 20, 2022 11:39 AM
To: slim-discuss <slim-d...@googlegroups.com>
Subject: Default fitness formula
 
--
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 on the web visit https://groups.google.com/d/msgid/slim-discuss/CAB03vn9sEjT7YN%3DUe38UTzWM73CESaPrLVtx2ivk1AzfxEVL3g%40mail.gmail.com.

Zuxi Cui

unread,
Sep 20, 2022, 3:20:03 PM9/20/22
to Peter Ralph, slim-discuss
Hi peter,

Thanks for the quick response. My question is, what the default formula of the probability of survival is if I do not specify?
In my script, I only specified the subpopulation fitness with "p1.fitnessScaling = K / p1.individualCount" but not the individual fitness.
As described in the manual, subpopulation fitness is on top of individual fitness, which I didn't specify. So I wonder
what would be the formula for the probability of survival?

Terry

Peter Ralph

unread,
Sep 20, 2022, 3:47:27 PM9/20/22
to Zuxi Cui, slim-discuss
Hi again, Terry. Briefly, if not specified then p1.fitnessScaling has not effect (and so is equal to 1); while individual fitness is determined by the product of fitness effects of mutations (just as in a WF model), and so is equal to 1 if all mutations are neutral. So - individual "fitness" is actually the same​ in WF and nonWF models, it just has different effects in the two models (fecundity in WF; survival in nonWF).

Also, a note about asking for help on this list: so, naive questions are definitely welcome on this list, and it is totally fine to ask a question even if the answer is somewhere in the manual. However, for the sake of everyone's time and inboxes, before asking a question here you should spend a reasonable amount of time trying to figure it out yourself. Different people have very different thresholds for how much time they'll spend before asking someone (and in my experience, I think most students wait too long). I think for this list, a good guideline is to spend, say, at least an hour carefully looking at the manual and trying small experiments in SLiMgui before asking on the list. Maybe after that point it's still unclear; if so, then by all means post the question, along with explanation of why/what is unclear. You'll notice that many questions posted to this list are very carefully explained, with background motivation, and look like they took a good bit of effort to write out. That said, I think it is very useful to have someone you can ask quick questions of to avoid looking things up, so no worries there; unfortunately, this list isn't quite that place - but, maybe you know others. It'd be nice to have a "SLiM tips" slack channel or something? But, at present most of the answering of questions here falls to Ben, and so it's not quite the right place for those quick questions.

thanks for the enthusiasm, and happy SLiMulating!
  Peter

From: Zuxi Cui <zxc...@case.edu>
Sent: Tuesday, September 20, 2022 12:19 PM
To: Peter Ralph <p...@uoregon.edu>
Cc: slim-discuss <slim-d...@googlegroups.com>
Subject: Re: Default fitness formula
 

Zuxi Cui

unread,
Sep 20, 2022, 4:25:06 PM9/20/22
to Peter Ralph, slim-discuss
Hi Peter,

Does SLiM do completely random picks if everyone's fitness is 1?

I experienced something interesting. I ran the attached script multiple times and ended up with different sample size outputs.
The sample size "K" was set to 200, but the output sizes were slightly different, although all were above 200.
The manual says the subpopulation fitness guarantees the output sample size to be no smaller than the specified, but I'm interested
in its formula. There are no selection effects in this case, including mutation or phenotype effects. If survival selection is under complete
randomization, why are sample sizes varying?


Terry
Cmating.code.CHB.simN1.txt

Peter Ralph

unread,
Sep 20, 2022, 4:32:40 PM9/20/22
to Zuxi Cui, slim-discuss
Ah-ha. It's because survival is still random (it's binomial, in fact); you can find some more explanation here:

From: Zuxi Cui <zxc...@case.edu>
Sent: Tuesday, September 20, 2022 1:24 PM
Reply all
Reply to author
Forward
0 new messages