Skip to content

Is it possible to save a simulation at an intermediate step? #1559

Answered by petrelharp
NJC12 asked this question in Q&A
Discussion options

You must be logged in to vote

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:

  • make one copy of the script; add a script block that saves out the tree sequence at the time you want.
  • make another copy of the script, add a 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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@NJC12
Comment options

Answer selected by NJC12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants