pyslim.recapitate( ) Errors #268
-
Hey all, So I've been working further on my last problem and have ensured that I'm using v0.700 of pyslim, but I am still coming across some problems. For the recapitation of the tree I have now described demography, but am still having no luck with pyslim.recapitate( ). import msprime, pyslim ts = tskit.load("MS123sweep.trees") demography = msprime.Demography.from_tree_sequence(ts, initial_size=20000) rts = pyslim.recapitate(ts, demography=demography, recombination_rate= 1.14e-8, random_seed=1) recap.dump("MS123sweepRecap.trees") After Using this script, I get the debug of the demography and this error: /opt/miniconda3/lib/python3.8/site-packages/msprime/ancestry.py:831: TimeUnitsMismatchWarning: The initial_state has time_units=unknown but time is measured in generations in msprime. This may lead to significant discrepancies between the timescales. If you wish to suppress this warning, you can use, e.g., warnings.simplefilter('ignore', msprime.TimeUnitsMismatchWarning) Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
(posted this to the SLiM list also) Let's see: there's some kind of mismatch between where the If that doesn't fix it, you can check where and when the lineages
and then printing your demography to make sure things match up. |
Beta Was this translation helpful? Give feedback.
(posted this to the SLiM list also)
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