interfacing SLiM with ms or mspms (rather than msprime) output

39 views
Skip to first unread message

Max Shpak

unread,
Jun 9, 2022, 12:13:20 PM6/9/22
to slim-discuss
I have several ms scripts generating genealogies for specific demographic models, and I was curious whether there is some way to use these (or equivalently, msmps) to recapitate SLiM models, as opposed to having to rewrite them all to fit the python syntax of msprime.

In other words, is SLiM at all set up to process ms output files and interface with them in recapitation?

Thank you, Max

Peter Ralph

unread,
Jun 9, 2022, 12:31:49 PM6/9/22
to Max Shpak, slim-discuss
Hi, Max! Let's see - it depends what exactly you mean here:
- You could probably use this method in demes:
https://popsim-consortium.github.io/demes-docs/latest/api.html#demes.from_ms
to convert your ms command to a python-readable YAML demographic
model, and then use msprime to do the recapitation.
- When we say "recapitation" we mean adding on ancient history *after*
the fact (which is possible if it's all neutral). This is not done in
SLiM at all, but operating on the tree sequence with python, so you'd
need to turn your ms to python.
- Or, maybe you mean that you'd like to start your SLiM simulation
with the results of your ms simulation. If so, then there's a
readFromMS( ) method in SLiM that will do what you want. (However,
note that you'll only get the genotypes, not the prior coalescent
history.)

* peter
> --
> SLiM forward genetic simulation: http://messerlab.org/slim/
> ---
> You received this message because you are subscribed to the Google Groups "slim-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to slim-discuss...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/slim-discuss/53713355-b0d4-4a8c-ae36-692a54369c41n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages