tracts.legacy_models.models_4pop
Functions
|
Constraint function evaluating below zero when constraints are not satisfied. |
|
|
|
A simple model in which populations 1, 2, 3 and 4 arrive discretely at first generation, 1 at a subsequent generation, followed 2 thereafter and finally 3. |
|
|
|
Obtains the proportion of present day genomes contributed by each population. |
- tracts.legacy_models.models_4pop.outofbounds_pppp_pxxx_xpxx_xxpx(*params)
Constraint function evaluating below zero when constraints are not satisfied.
- tracts.legacy_models.models_4pop.outofbounds_pppp_pxxx_xpxx_xxpx_fix(params, fracs)
- tracts.legacy_models.models_4pop.pppp_pxxx_xpxx_xxpx(*params)
A simple model in which populations 1, 2, 3 and 4 arrive discretely at first generation, 1 at a subsequent generation, followed 2 thereafter and finally 3. If a time is not integer, the migration is divided between neighboring times proportional to the non-integer time fraction. We’ll assume population 3 and 4 still replaces migrants from 1 and 2 after the replacement from population 1 and 2 if they arrive at same generation.
- Parameters:
params (tuple) – A tuple with the following entries: (prop1, tstart, prop3, prop4, t3, t4). prop1 is the initial proportion from population 1, prop2=1-prop1, tstart is the arrival times of pops (1,2), t3 is the arrival time of population 3 and t4 is the arrival time of population 4. prop3 and prop4 are the proportion of migrants from populations 3 and 4, respectively.
Notes
The two times are measured in units of 100 generations, because some python optimizers work better when all parameters have the same scale.
- tracts.legacy_models.models_4pop.pppp_pxxx_xpxx_xxpx_fix(params, fracs)
- tracts.legacy_models.models_4pop.propfrommig(mig)
Obtains the proportion of present day genomes contributed by each population.