Timing of discrete admixture events

111 views
Skip to first unread message

Daniel Portik

unread,
Oct 26, 2017, 4:36:47 PM10/26/17
to dadi-user
Hi Ryan,
I am hoping this is a simple question meriting a simple answer. I am trying to explore models that incorporate discrete admixture events, rather than continuous migration, and am having difficulty understanding the timing of these events. Take for example, the two basic models below:

--------------------------------------------------------------------------------------------
def model1(params, ns, pts):
    nu1, nu2, T, f = params
    xx = Numerics.default_grid(pts)
    phi = PhiManip.phi_1D(xx)

    phi = PhiManip.phi_1D_to_2D(xx, phi)

    phi = PhiManip.phi_2D_admix_1_into_2(phi, f, xx,xx)

    phi = Integration.two_pops(phi, xx, T, nu1, nu2, m12=0, m21=0)

    fs = Spectrum.from_phi(phi, ns, (xx,xx))
    return fs
---------------------------------------------------------------------------------------------
def model2(params, ns, pts):
    nu1, nu2, T, f = params
    xx = Numerics.default_grid(pts)
    phi = PhiManip.phi_1D(xx)

    phi = PhiManip.phi_1D_to_2D(xx, phi)

    phi = Integration.two_pops(phi, xx, T, nu1, nu2, m12=0, m21=0)

    phi = PhiManip.phi_2D_admix_1_into_2(phi, f, xx,xx)

    fs = Spectrum.from_phi(phi, ns, (xx,xx))
    return fs
--------------------------------------------------------------------------------------------

Is the difference here that the admixture pulse happens immediately after divergence in model1 (and before any drift occurs in interval T), and after divergence and drift occurs during interval T in model2? If so, to place the admixture event somewhere in between, would the solution be to have two integration functions (for intervals T1, T2) and write the admixture function in between?
For example:

    phi = Integration.two_pops(phi, xx, T1, nu1, nu2, m12=0, m21=0)
    phi = PhiManip.phi_2D_admix_1_into_2(phi, f, xx,xx)
    phi = Integration.two_pops(phi, xx, T2, nu1, nu2, m12=0, m21=0)

Let me know if I am on the right track here, I haven't seen too many examples of models with these discrete admixture events. They make more sense for an island system I am working on at the moment, and I am hoping to incorporate them.

Thanks,
Dan


Ryan Gutenkunst

unread,
Oct 26, 2017, 7:46:27 PM10/26/17
to dadi...@googlegroups.com
Hi Dan,

Yes, you’re exactly correct. To have discrete admixture in the middle of the interval, you need something like your last example.

Best,
Ryan

--
You received this message because you are subscribed to the Google Groups "dadi-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dadi-user+...@googlegroups.com.
To post to this group, send email to dadi...@googlegroups.com.
Visit this group at https://groups.google.com/group/dadi-user.
For more options, visit https://groups.google.com/d/optout.

Daniel Portik

unread,
Oct 26, 2017, 11:25:40 PM10/26/17
to dadi-user
Awesome, thanks very much for your quick response!

Diana Aguilar Gomez

unread,
Apr 4, 2024, 5:09:16 PMApr 4
to dadi-user

Hi,

Sorry I could not find many examples with the type of model that I am trying to do, but it involved a single discrete admixture event. I want a model with a population that splits from a ghost population and then gets an admixture event from it. Would the following model make sense?

def Ghost(params, ns, pts):
    #nu1 pop1
    #T1 population split
    #T2 time for admixture pulse
    #f admixture pulse from ghost into pop1

    nu1, T1 ,f= params

    xx = Numerics.default_grid(pts)
    phi = PhiManip.phi_1D(xx)
    phi = PhiManip.phi_1D_to_2D(xx, phi)

    #Population split no migration, ghost population size of ancestral
    phi = Integration.two_pops(phi, xx, T1, 1, nu1, m12 = 0, m21 = 0)
 
    #Population split admixture event

    phi = PhiManip.phi_2D_admix_1_into_2(phi, f, xx,xx)

    #T2 for admixture pulse
    phi = Integration.two_pops(phi, xx, T2, 1, nu1, m12 = 0, m21 = 0)

   #remove ghost
    phi = PhiManip.remove_pop(phi,xx,1)
    fs = Spectrum.from_phi(phi, ns, (xx,))
    return fs


If this is correct, would T2 be the time of admixture?
How do I scale the f parameter in admix? Is it the same way that migration parameters are scaled? Sorry I could not find this in the manual.

Thank you,
Diana

Ryan Gutenkunst

unread,
Apr 8, 2024, 6:46:18 PMApr 8
to dadi-user
Hello Diana,

Your model code looks good to me. Here T2 would be the time in the past that the admixture occurred. The parameter f is a fraction, so it must lie between 0 and 1.

Best,
Ryan
> To view this discussion on the web visit https://groups.google.com/d/msgid/dadi-user/4ca63b8e-8e4f-4e79-98d4-62c89a6e3a54n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages