Menu

MigrationWalkthrough

Robert Kofler Christos Vlachos

1 Introduction

In these walkthrough we introduce simulations with migration using a toy example.

We perform simulations with MimicrEE2 to demonstrate how different migration regimes can be integrated into the simulations. As output we request the haplotypes which allows us to monitor the evolution of the haplotypes.

2 Required input files

haplotypes of the base population

We save the following content in file basepop.mimhap

2L  1   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  2   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  3   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  4   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  5   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  6   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  7   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  8   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  9   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  10  G   A/T AA AA AA AA AA AA AA AA AA AA

haplotypes of the source population

We save the following content in file sourcepop.mimhap

2L  1   G   A/T TT TT TT TT TT TT TT TT TT TT
2L  2   G   A/T TT TT TT TT TT TT TT TT TT TT
2L  3   G   A/T TT TT TT TT TT TT TT TT TT TT
2L  4   G   A/T TT TT TT TT TT TT TT TT TT TT
2L  5   G   A/T TT TT TT TT TT TT TT TT TT TT
2L  6   G   A/T TT TT TT TT TT TT TT TT TT TT
2L  7   G   A/T TT TT TT TT TT TT TT TT TT TT
2L  8   G   A/T TT TT TT TT TT TT TT TT TT TT
2L  9   G   A/T TT TT TT TT TT TT TT TT TT TT
2L  10  G   A/T TT TT TT TT TT TT TT TT TT TT

recombination rate

We save the following content in file recrate.txt

[lambda]
2L:1..10    1

Note: We specify that on the average 1 recombination event per zygote will take place on chromosome 2L between sites 1 and 10.

3 Simulations with migration

We start with a simple scenario.

migration regime

We store the following content in file migrationregime.txt

10  5   sourcepop.mimhap
20  5

This file specifies migration at generations 10 and 20 (column 1). At generation 10, five migrants (10 haplotypes) will move from the source population to the evolved population. At generation 20, another five migrants will move from the base population to the evolved population (if no source population is specified the base population is used as source).

For details on the migration regime file see [MiscInput]

run MimicrEE2

mkdir output
java -jar mim2.jar w --haplotypes-g0 basepop.mimhap --migration-regime migrationregime.txt --recombination-rate recrate.txt --snapshots 9,10,19,20 --output-dir output

output haplotypes

haplotypes at generation 9

At generation 9 we find the haplotypes directly before the first migration event.

2L  1   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  2   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  3   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  4   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  5   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  6   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  7   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  8   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  9   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  10  G   A/T AA AA AA AA AA AA AA AA AA AA

haplotypes at generation 10

At generation 10 we have the haplotypes directly following the first migration event

2L  1   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  2   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  3   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  4   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  5   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  6   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  7   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  8   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  9   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  10  G   A/T TT TT TT TT TT AA AA AA AA AA

haplotypes at generation 19

At generation 19 we find the haplotypes directly before the second migration event

2L  1   G   A/T TT TA AA TA AT AA AT AA TA AA
2L  2   G   A/T TT TA AA TA AT AA AT AA TA AA
2L  3   G   A/T AA AA TT TA TT AA AA AA AT TA
2L  4   G   A/T TT TA AT AT AT AA TT TA TA AA
2L  5   G   A/T AT TA TA AT AT AA TA AA TA AT
2L  6   G   A/T TT AA TT TT TT AA TT TA TT TT
2L  7   G   A/T TT TA TT TT TT TA TT TT TT TT
2L  8   G   A/T TT TT TT TT TT TT TT TT TT TT
2L  9   G   A/T TT AA TT TT TA AA TT TT TT TT
2L  10  G   A/T TT TT AT TT TT TT TT TT TT TA

haplotypes at generation 20

At generation 20 we have the haplotypes directly after the second migration event

2L  1   G   A/T AA AA AA AA AA TT AA AA TA AA
2L  2   G   A/T AA AA AA AA AA TT AA AA TA AA
2L  3   G   A/T AA AA AA AA AA AT TA AA AA TA
2L  4   G   A/T AA AA AA AA AA TT AA AT TT AA
2L  5   G   A/T AA AA AA AA AA AT AA AT AT AA
2L  6   G   A/T AA AA AA AA AA TT TA AT TT TA
2L  7   G   A/T AA AA AA AA AA TT TA AT TT TA
2L  8   G   A/T AA AA AA AA AA TT TT TT TT TT
2L  9   G   A/T AA AA AA AA AA TA TA AT TT TA
2L  10  G   A/T AA AA AA AA AA TT TT TT TT TT

4 Simualtions with migration and selection

In this example we simulate competition between two beneficial haplotypes. Both haplotypes carry a beneficial mutation, but no haplotype carries both. This situation is, at least in the beginning, similar to clonal interference. The major difference however is that recombination may eventually join both beneficial alleles at the same haplotype.

Initially only one haplotype is present, the second haplotype is introduced at generation 10 by migration.

For this walkthrough we will use the same base population, source population and recombination rate as in the previous example.

We will however use a novel migration regime file and additionally specify a selected locus

migration regime file

We store the following content in the file migrationregime.txt

10  5   sourcepop.mimhap

At generation 10 we introduce 5 individuals from the source population to the evolving population.

selected locus

We store the following content in the file sellocus.txt

[s]
2L  2   A/T 1.0 0.5
2L  9   T/A 1.0 0.5

For the locus at position 2 the allele T is beneficial and for the locus at position 9 the allele A is beneficial. Both alleles have the same selection coefficient (1.0) and heterozyous effect (0.5 additive effect).

run MimicrEE2

mkdir output
java -jar mim2.jar w --haplotypes-g0 basepop.mimhap --migration-regime migrationregime.txt --recombination-rate recrate.txt --snapshots 9,10,20,30,40,50 --output-dir output

output haplotypes

haplotypes at generation 9

At generation 9 we have the haplotypes directly before the migration event

2L  1   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  2   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  3   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  4   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  5   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  6   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  7   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  8   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  9   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  10  G   A/T AA AA AA AA AA AA AA AA AA AA

haplotypes at generation 10

At generation 10 we have the haplotypes directly after migration

2L  1   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  2   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  3   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  4   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  5   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  6   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  7   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  8   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  9   G   A/T TT TT TT TT TT AA AA AA AA AA
2L  10  G   A/T TT TT TT TT TT AA AA AA AA AA

haplotypes at generation 20

Recombination quickly generates novel haplotypes linking both beneficial alleles

2L  1   G   A/T TT TT AT TA TA TT TT TT TA TA
2L  2   G   A/T TT TT AT TA TA TT TT TT TA TA
2L  3   G   A/T TA AA AT TA AA TA TT TA TA AA
2L  4   G   A/T TA TA AT TA TA TA TT TA TA AA
2L  5   G   A/T TA TA AT TA TA TA TT TA TA AA
2L  6   G   A/T TA TT AT TA TA TA TT TT TA AA
2L  7   G   A/T AT TT AA AT AT AT AA AT AT TA
2L  8   G   A/T AA AT AA AT AA AA AA AT TT AA
2L  9   G   A/T AA AT AA AT AA AA AA AT TT AA
2L  10  G   A/T TT TT TT TT TT TT TT TT TT TT

haplotypes at generation 50

By generation 50 both beneficial alleles (T at site 2 and A at site 9) got fixed

2L  1   G   A/T TT TT TT TT TT TT TT TT TT TT
2L  2   G   A/T TT TT TT TT TT TT TT TT TT TT
2L  3   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  4   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  5   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  6   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  7   G   A/T TT TT TT TT TT TT TT TT TT TT
2L  8   G   A/T TT TT AT AA TA TA AA TA TT TA
2L  9   G   A/T AA AA AA AA AA AA AA AA AA AA
2L  10  G   A/T TT TT TT TT TT TT TT TT TT TT

Related

Wiki: Home
Wiki: MiscInput
Wiki: Walkthrough for w mode

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.