This callback specifies that a code block is providing logic to decide the fitness of a mutation in an individual.
The callback should return a the relative fitness value of the mutation, where a value of 1.0 is neutral. This is
called once per mutation per individual per generation in which it is active. If mut_id_type = NULL
then
the callback will be called only once per individual and should return a global relative fitness value that is
independent of mutations the individual possesses.
see SLiM Manual: page 596
fitness(mut_type_id, subpop_id)
The id of the mutationType to which this callback should apply. Can be an integer 1, 2, etc., or character "m1", "m2", etc.
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:
A Mutation object, the mutation whose relative fitness is being evaluated
A value of T (the mutation is homozygous), F (heterozygous), or NULL (it is paired with a null chromosome, which can occur with sex chromosomes)
The default relative fitness value calculated by SLiM
The individual carrying this mutation (an object of class Individual)
One genome of the individual carrying this mutation
The other genome of that 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()
,
fitnessEffect()
,
initialize()
,
interaction()
,
late()
,
mateChoice()
,
modifyChild()
,
mutationEffect()
,
mutation()
,
recombination()
,
reproduction()
,
slim_callbacks()
,
survival()
slim_block(fitness(m2), {
## sets up frequency dependent selection for m2
return(1.5 - sim.mutationFrequencies(p1, mut))
})
#> A slimr_block:
#> <slimr_script[1]>
#> block_1:1:1 fitness(m2) {
#> return(1.5 - sim.mutationFrequencies(p1, mut));
#> }