bodkan/slendr

Allow different mutation rate at different location on the demography ?

Jilong-Jerome opened this issue · 2 comments

Hi Martin,

Thanks for the super nice illustration at popgen22.

Followings are just some thoughts about some features that might be added in slendr.

In function ts_mutate(), user defined a mutation rate and SNPs are introduced into the tree sequence evenly across the tree at the same mutation rate.

Sometimes there are known mutation rate change in different populations/species, would it be possible to allow mutations introduced at different rate on different tree branch ? (even allow mutation rate change changing at a single point on from a branch branch)

Ideally, this may help in estimating the rough time point of events like mutation rate switching.

It sounds like adding mutation rate as an editable parameter something like the population size to the population class.

For users, it would be cool to have something like
resize(pop, N, how, time, end = NULL)
remut(pop, mutation_rate, how, time,.....)

Best,
Jilong

Hello Jilong,

It was nice to meet you at the workshop! Thanks for the suggestion.

I had misunderstood what you originally asked about -- I thought the question was about varying mutation rates along the genome, not along different branches of tree sequences, so to say.

I'm not sure if tskit supports that but I'll try to do some digging. In principle, this should be possible -- after all, it's just about sprinkling mutations at a different rate at different "cuts" of the trees or different branches. What I'm not so sure about if this is implemented in the back end module we use in slendr.

I will have to unfortunately close this because there’s no way I found a way to get this done using the lowlevel simulation and tree sequence components that slendr uses… Happy to reopen in the future if a solution comes by that allows this.