Is it possible to save a simulation at an intermediate step? #1559
-
Essentially, I would like to save a slim simulation at a specific point in the demographic model, then run the remaining steps of the model repeatedly starting from this saved state. Equivalently, I could run a full simulation (that represents only the first portion of the demographic model), then load and continue that simulation. The reason is that I'm using the cattle demography, which begins with 33,000 generations of a large ancestral effective population (62,000). However, most of the randomness in the simulations will come from later epochs, which have very small effective population sizes. I'd like to run the burn-in and first epoch and save the result. By loading this, I can experiment with different parameters for subsequent epochs without repeating this time-intensive first step over and over. I'm worried that I may be missing something obvious, but I haven't found any way to load a contig that isn't either generic or pre-defined for the species. Thanks for the help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That's a good question. We haven't got the machinery set up to do that, although some related machinery exists to be able to condition on allele frequencies. I think at this point the best option might be to save out the SLiM script and then modify it to do what you want. The script isn't terribly readable, but what you want to do should be do-able without intricate knowledge of SLiM:
Since loading in a tree sequence resets SLiM to the time step that is recorded in the tree sequence, this should skip all the earlier stuff and just continue on from where you want it to. However, I'd need to look pretty closely to make sure this works. Happy to advise if you want to try to get this going. |
Beta Was this translation helpful? Give feedback.
That's a good question. We haven't got the machinery set up to do that, although some related machinery exists to be able to condition on allele frequencies. I think at this point the best option might be to save out the SLiM script and then modify it to do what you want. The script isn't terribly readable, but what you want to do should be do-able without intricate knowledge of SLiM:
1 first() { }
script block that loads in the saved tree sequence.Since loading in a tree sequence resets SLiM to the time step that is recorded in the tree sequence…