tskit-dev / msprime

Simulate genealogical trees and genomic sequence data using population genetic models
GNU General Public License v3.0
177 stars 88 forks source link

Add demographic event for recombination maps #1095

Open troycomi opened 4 years ago

troycomi commented 4 years ago

We are interested in simulating the effect of differing recombination on some population genetics methods. It would be useful to extend the demographic model to include a 'change recombination rate' class which would apply a new recombination map/rate at a given time. Ideally, this could be population-specific or apply to all populations, but I understand the former is more complicated.

jeromekelleher commented 4 years ago

I think changing the map through time is reasonably do-able, but we'll need to wait until #1079 is resolved before being in a position to look at it.

There's a lot of stuff that needs to be finished up for 1.0 though, so I'm not sure whether we could get it done before this (unless you're in a position to help out?).

TPPSellinger commented 4 years ago

I'm also interested in this feature. I could participate in building the test in verification.py if necessary.

jeromekelleher commented 4 years ago

Thanks @TPPSellinger. There's still a lot of work to be done for 1.0, https://github.com/tskit-dev/msprime/milestone/9, so I'm afraid I can't make any promises about whether we'll get to implementing it.

jeromekelleher commented 4 years ago

With recent refactoring, having population specific maps should be fairly straightforward now. However, there's a long queue of things that need to be done for 1.0, so unless someone volunteers to do some coding I think this will have to go out to 1.1.

hyanwong commented 2 years ago

Pinging @davidrasm as he was interested in this (see #2017)

davidrasm commented 2 years ago

I'm glad to see there's interest in this @hyanwong. We were thinking about a pretty standard structured coalescent model with n-demes, but where the recombination rate varies depending on what deme a lineage is in. This would mimic for example that recombination rates vary due to environmental or demographic conditions across locations (e.g. recombination rates might increase with population densities). So in this case different populations would need to have different recombination maps and a migrant would take the map of the population it enters.