Skip to content

Mutation rate interpretation in biallelic models [Recipe 14.13] #636

Description

@vsudbrack

Hello!

A quick comment about the SLiM manual. The current recipe for biallelic loci, sec. 14.13, implements the following mutation callbacks:

mutation(m2) {
// unique down to the canonical m2 mutation
return MUT2[mut.position];
}
mutation(m3) {
// unique down to the canonical m3 mutation
return MUT3[mut.position];
}

Notice that this mutation process includes events from m2 to m2 and from m3 to m3, which produce no allelic change at all (due to the uniquing down). Therefore, this version of the recipe actually has an effective mutation rate lower than the rate specified in initializeMutationRate(). With equal mutation rates and under neutrality, such that the equilibrium is 50% m2 and 50% m3, the effective mutation rate is approximately half of the value passed to initializeMutationRate().

This is, of course, not a bug per se, since SLiM’s interpretation of mutation rates is completly consistent. However, I would suggest either adding a warning to the recipe, along the lines of:

Notice that, if you are comparing this recipe with biallelic models in which mutation rates are defined as probabilities of switching between the two alleles, the effective switching rate in this recipe is lower than the rate passed to initializeMutationRate() due to...

Alternatively, the mutation callbacks could be updated as follows, which might also be instructive for people learning SLiM:

/// Back and forth mutations m2<-->m3
mutation(m2) {
	pos = mut.position;
	originally_m2 = haplosome.containsMutations(MUT2[pos]);
	return ifelse(originally_m2, MUT3[pos], MUT2[pos]);
}

mutation(m3) {
	pos = mut.position;
	originally_m2 = haplosome.containsMutations(MUT2[pos]);
	return ifelse(originally_m2, MUT3[pos], MUT2[pos]);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions