Hm - there will be in SLiM v4 - but, can't you just specify your
demography in msprime using the names they have, like
demog.add_population(name = "p1", initial_size = 20000, initially_active=True)
instead?
On Fri, Jul 22, 2022 at 1:18 PM Max Shpak <
shpa...@gmail.com> wrote:
>
> I successfully implemented the union function with the null argument. However, I have one problem: I'm merging three subpopulations, e.g.
> tsnew = ts1.union(ts2, NULL...)
> tsnew = tsnew.union(ts3, NULL...)
>
> I named the populations corresponding to ts1,ts2,ts3 p1, p2, p3 in SLiM. However, when I specify the demographic history, I cannot use numeric designations,
>
> demog = msprime.Demography()
> demog.add_population(name = "A", initial_size = 20000, initially_active=True)
> demog.add_population(name = "B", initial_size = 10000, initially_active=True)
> demog.add_population(name = "C", initial_size = 10000)
> demog.add_population_parameters_change(time=1000, population="B", initial_size=5000)
> demog.add_population_split(time=1000, derived=["C"], ancestral="B")
> demog.add_population_split(time=2000, derived=["B"], ancestral="A")
>
> # recapitation
> rts = pyslim.recapitate(ts_new, recombination_rate = 1.14e-8, gene_conversion_rate = 5.9e-8, gene_conversion_tract_length = 518, ancestral_Ne=20000, random_seed = ancestry_seed)
>
> Is there some way to set the demography in such a way that ts1 gets assigned to population A, ts2 to B, ts3 to C? I need to keep track of this because different subpopulations experience distinct evolutionary histories.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/slim-discuss/d5348619-7d35-4c1b-bacb-671c82bba6c9n%40googlegroups.com.