I’m currently trying to get a better grasp of the recapitation aspect of SliM/pyslim and I’d like to get some inputs on wether or not I’m using it correctly.
Here’s the intended scenario :
Here’s a quick
breakdown of my simulations.
First, the SLiM
part, with tree-seq recording on :
Then, the recapitation part :
I’m pretty confident about the general breakdown and the SLiM part, but I’m not quite sure that I’ve got each step correct through the ‘run’, especially the parts concerning the recapitation using a specific demography, as I’ve never used this before, and have to go from ‘forward time’ to ‘backward time’ and alternate between them.
One of the biggest question I have is to know what does recapitation does to the ‘already existing demographic events’. Does the process just ‘goes backward in time without doing anything up to the point where trees were ‘created’ aka the first generation in SLiM and THEN proceed to use coalescent simulations ? Or does it actually ‘use’ the specified demography to ‘change’ the already existing trees, thus altering the already existing parts of the trees to ‘fit’ the specified demography ?
From my understanding, it should be the first explaination but better safe than sorry, especially as I’m not quite sure that my demography is correctly specified in my script and don't want it to mess with the forward part of my simulations.
I’ve added both my scripts to this post (with some comments on the ‘recapitation’ jupyter notebook), if anyone would be kind enough to have a look at them and tell me if I’ve made any mistakes or have any tips or advices to share, that would be very kind !
Cheers,
Guillaume