Hi, Kadee! Let's see: there's some kind of mismatch between where the
lineages are in the tree sequence and the demography. I can't be sure
without knowing some more things about the SLiM recipe, but my first
guess is that your SLiM simulation ran for 400 generations, and
everyone there is in population 3? This would create the error that
you're seeing because add_subpopulation_split(time=400, derived,
ancestral) implies that more recently than 400 time units ago, the
derived pops are "inactive" (ie didn't exist), so that all lineages
should shift from the derived populations to the ancestral one. This
means it's an error if there are any lineages in the derived pops
before time=400. The way that time intervals work in msprime, however,
it's an error if there are lineages in the derived pops with time >=
400; and if your SLiM simulation ran for 400 generations, then that
will be the time of the lineages you're trying to recapitate. The fix
is to change 400 to 401 (or any number larger than 400).
If that doesn't fix it, you can check where and when the lineages
needing recapitation are by something like:
```
for p, t in set([ts.node(r).population, ts.node(r).time for t in
ts.trees for r in t.roots]):
print(f"pop {p}, time {t}")
```
and then printing your demography to make sure things match up. If you
have further issues perhaps you should post it ias a discussion on
pyslim?
thanks,
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/1f25e6f6-0f4d-4f87-9ecb-4504672a3b8cn%40googlegroups.com.