Skip to content

mutation() callbacks should allow the removal of previous mutations #675

Description

@bhaller

It should be possible to basically "roll your own stacking policy" with a mutation() callback. That would be much more possible if mutation() callbacks had a return value that said "remove the existing mutation(s) at this site", maybe within a particular stacking group. Then you could (a) add a new mutation while removing previous mutations, which is currently policy "l", (b) suppress the new mutation while keeping previous mutation(s), which is currently policy "f", and more importantly (c) suppress the new mutation while removing previous mutations, reverting back to the "empty state". Possibility (c) would allow lots of nice things – back-mutations to the ancestral state, biallelic models with empty/mutated states, triallelic models with -1/0/+1 states, and so forth. The user would be much more in control of how mutations work in SLiM.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions