AFMT

Biology

Allele Frequency Migration Trend Calculator

Project p and q under a deterministic constant-migration model and convert the final allele frequencies to expected genotype counts.

p after entered generations-
q after entered generations-
Expected pp count-
Expected pq count-
Expected qq count-
Final minus initial p-
Share of initial resident-migrant gap remaining-

Decision view

Migration-only allele-frequency trend

Migration-only allele-frequency trendGeneration is the x-axis; p and q allele frequencies are separate dimensionless series.
Exact scenario comparisonMigrant share per generation changes while all other entered assumptions remain constant.
Migrant share per generationp after entered generationsq after entered generationsExpected pp countExpected pq countExpected qq countFinal minus initial pShare of initial resident-migrant gap remaining

Period-by-period detail

Migration-only allele and genotype trend

Every generation updates resident p toward the constant entered migrant-pool frequency, then recalculates q and genotype expectations.

How to use Allele Frequency Migration Trend Calculator

  1. Enter resident and migrant allele frequencies.
  2. Set the migration share and generations.
  3. Enter the modeled population count.
  4. Read the stacked allele trend and final genotype counts.

Calculator guide

Understanding Allele Frequency Migration Trend Calculator

Constant migration moves resident allele frequency toward the migrant-pool frequency by a fixed fraction of the remaining gap each generation. The path is exponential, not a straight-line subtraction.

Initial gap Resident minus migrant p.
Decay Gap multiplies by 1−m.
Trend p approaches migrant p.
Composition p and q always sum to one.

Calculation method

How the calculation works

Model a Hardy-Weinberg migration trend by applying a constant migrant-pool allele frequency and share once per generation, then recalculating genotype expectations. Update p with p_{t+1} = (1−m)p_t + mp_m; the closed form retains (1−m)^t of the initial resident-to-migrant gap.

Detailed calculation process

Trace migration-driven allele frequency through generations

The default begins at p = 0.70, uses migrant p = 0.35 and migration share 0.04 for 12 generations, with 5,000 modeled individuals.

General formula: p_{t+1} = (1-m)p_t + mp_mp_t = p_m + (p_0-p_m)(1-m)^tq_t = 1-p_tN_pp = Np_t^2N_pq = 2Np_tq_tN_qq = Nq_t^2 Every generation replaces fraction m of the resident pool with the constant migrant pool. The remaining gap shrinks geometrically, then Hardy-Weinberg proportions translate final p and q into genotype expectations.

What each symbol means

p_0, p_t Initial and generation-t resident p frequencies.
p_m Constant migrant-pool p frequency.
m Migrant share applied per generation (proportion).
t Generation index.
q_t Generation-t q frequency.
N Modeled population count (individuals).
N_pp, N_pq, N_qq Final expected genotype counts.

Worked substitution with the default inputs

1. Identify the initial gap p_0-p_m = 0.70-0.35 = 0.351-m = 1-0.04 = 0.96 Each generation retains 96% of the gap remaining before migration.
2. Compound the remaining gap (1-m)^12 = 0.96^12 = 0.612709757remaining gap = 0.35(0.612709757) = 0.214448415 The same four-percent pull is applied to a progressively smaller gap.
3. Calculate final alleles p_12 = 0.35+0.214448415 = 0.564448415q_12 = 1-0.564448415 = 0.435551585 The two allele frequencies still sum to one.
4. Calculate final genotype counts N_pp = 5000(0.564448415)^2 = 1593.010N_pq = 2(5000)(0.564448415)(0.435551585) = 2458.464N_qq = 5000(0.435551585)^2 = 948.526 The expected counts reconcile to 5,000.
5. Reconcile change and direction Delta_p = 0.564448415-0.70 = -0.1355515851593.010+2458.464+948.526 = 5000 Because migrant p is lower, resident p moves downward while remaining between 0.35 and 0.70.

After 12 generations, default p is 0.564448 and q is 0.435552; 61.271% of the initial resident-migrant gap remains.

Purpose-built visual

Read an allele-frequency stacked area trend

Complementary p and q areas fill the whole frequency scale at every generation, making conservation and convergence visible.

p area Resident p through time.
q area Complement to one.
Target line Migrant-pool p.
Endpoint Final expected composition.

Worked situations

Practical examples

  • The first update moves p from 0.70 to 0.686.
  • After 12 generations p is 0.564448.
  • Expected final genotype counts sum to 5,000.

Better inputs

Useful tips

  • Use a migration share between zero and one.
  • Treat the migrant pool as constant only when defensible.
  • Compare with drift or selection models separately.

Before relying on the result

Limitations and common mistakes

  • The model is deterministic and migration-only.
  • Drift, selection, mutation, mating structure, and changing N are excluded.
  • Genotype proportions are recalculated from Hardy-Weinberg expectations.

Reference

Key terms

Gene flow
Movement of alleles between populations.
Migration share
Fraction replaced or mixed per modeled generation.
Gap decay
Geometric reduction of resident-migrant difference.
Closed form
Direct formula for generation t without iterating all earlier steps.

Important note

Calculated from the entered values using the displayed biological or statistical model. Study design, sampling, measurement quality, and biological variation affect interpretation.

Frequently asked questions

Why does the curve flatten?

Migration acts on the remaining resident-migrant gap, which gets smaller.

Can p overshoot migrant p?

Not under a constant share between zero and one in this model.

Does population count affect p?

No. It only converts final proportions to expected counts.

Is genetic drift included?

No. The trend is deterministic.