A fitnessEffect() callback is called by SLiM when it is determining the fitness of an individual – typically, but not always, once per tick during the fitness calculation tick cycle stage. Normally, the fitness of a given individual is determined by multiplying together the fitness effects of all mutations possessed by that individual (see section 25.2 for further discussion). Supplying a fitnessEffect() callback allows you to add another multiplicative fitness effect into that calculation. As with mutationEffect() callbacks, the value returned by fitnessEffect() callbacks is a fitness effect, so 1.0 is neutral. For details see SLiM Manual: page 715
fitnessEffect(subpop_id)
The id(s) of the subpopulation(s) to which this callback should apply. Can be an integer 1, 2, etc., or character "p1", "p2", etc.
None
Global variables available in reproduction callbacks:
The individual carrying this mutation (an object of class Individual)
The subpopulation in which that individual lives
This is documentation for a function in the SLiM software, and has been modified from the official manual, which can be found here: http://benhaller.com/slim/SLiM_Manual.pdf. This documentation is Copyright © 2016-2020 Philipp Messer. All rights reserved. More information about SLiM can be found on the official website: https://messerlab.org/slim/
Other callbacks:
early()
,
first()
,
fitness()
,
initialize()
,
interaction()
,
late()
,
mateChoice()
,
modifyChild()
,
mutationEffect()
,
mutation()
,
recombination()
,
reproduction()
,
slim_callbacks()
,
survival()
slim_block(fitnessEffect(p3), {
# multiplies all individual's fitness by 0.75
return(0.75)
})
#> A slimr_block:
#> <slimr_script[1]>
#> block_1:1:1 fitnessEffect(p3) {
#> return(0.75);
#> }