A mutationEffect() callback is called by SLiM when it is determining the fitness effect of a mutation carried by an individual. Normally, the fitness effect of a mutation is determined by the selection coefficient s of the mutation and the dominance coefficient h of the mutation (the latter used only if the individual is heterozygous for the mutation). For details on this callback see SLiM Manual: page 712
mutationEffect(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 mutationEffect 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, and is thus hemizygous or haploid)
The default relative fitness value calculated by SLiM
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()
,
fitnessEffect()
,
fitness()
,
initialize()
,
interaction()
,
late()
,
mateChoice()
,
modifyChild()
,
mutation()
,
recombination()
,
reproduction()
,
slim_callbacks()
,
survival()
slim_block(mutationEffect(), {
if (homozygous) {
return(1.0 + mut.selectionCoeff);
} else {
return(1.0 + mut.mutationType.dominanceCoeff * mut.selectionCoeff);
}
})
#> A slimr_block:
#> <slimr_script[1]>
#> block_1:1:1 mutationEffect() {
#> if (homozygous) {
#> return(1 + mut.selectionCoeff);
#> } else {
#> return(1 + mut.mutationType.dominanceCoeff * mut.selectionCoeff);
#> }
#> }