help with setting up migration matrix

41 views
Skip to first unread message

Kritika Garg

unread,
Apr 11, 2016, 10:23:43 PM4/11/16
to popABC
Dear All,
               Thank you for your continuous support. I have gone through multiple post and I am still not sure about setting up migration matrix for a 3 population model where there is migration between the sister population only. Below is the tree topology that I want to model. In this model there is gene flow between populations 0 and 1. Population 2 is isolated and does not contribute to any migrants to both populations 0 and 1. Any help is highly appreciated.
 



Thank you

Regards
Kritika

Auto Generated Inline Image 1

Joao Sollari Lopes

unread,
Apr 25, 2016, 9:14:14 AM4/25/16
to pop...@googlegroups.com
Hi Kritika,

Sorry for the late reply. Here is a detailed explanation taken from
https://groups.google.com/forum/#!searchin/popabc/migration/popabc/SRrTAt_DBG8/7tepGz0GLMkJ
Note that this is best viewed in a monospaced font (e.g. Courier or Liberation Mono), so it is best if you change your browser font or copy-past it to a text editor and change the font to a monospaced one.
I mentioned the migration weight matrix, which is a matrix in which the columns are Origins and rows are Destinations such that:

        Origin
        pop0  pop1  pop2
D pop0  t1 x  t1 x  t1 x
e       t2 x  t2 x  t2 x
s
t pop1  t1 x  t1 x  t1 x
i       t2 x  t2 x  t2 x
n
a pop2  t1 x  t1 x  t1 x
t       t2 x  t2 x  t2 x


---3/16/11 by shu-ping---
Unfortunately, the way to set this matrix is not very intuitive. I'll
try to explain it here a bit better using the following three-
population topology '(0, 1), 2)' or '1 0 2 0':

      ||             Neanc2          0
      ||               |             |
    t2||         ------------        |---------------|
      ||         |          |        |               |
      ||      Neanc1        |        |               |
      ||         |          |   OR   |               |
      ||         |          |        |               |
    t1||     ---------      |        |-------|       |
      ||     |       |      |        |       |       |
      ||     |       |      |        |       |       |
      \/    Ne      Ne     Ne        0       1       2


Using the image above it might be easier to understand how to set the
migration weights matrix. In this case we have 3 populations to
consider with 2 periods of time:

      pop0  pop1  pop2

pop0  t1 x  t1 x  t1 x
      t2 x  t2 x  t2 x

pop1  t1 x  t1 x  t1 x
      t2 x  t2 x  t2 x

pop2  t1 x  t1 x  t1 x
      t2 x  t2 x  t2 x


First we can put 0 in the migrations between the same populations:

      pop0  pop1  pop2

pop0  t1 0  t1 x  t1 x
      t2 0  t2 x  t2 x

pop1  t1 x  t1 0  t1 x
      t2 x  t2 0  t2 x

pop2  t1 x  t1 x  t1 0
      t2 x  t2 x  t2 0


Then we can put 0 in the populations that disappear after a joining
event (from present to past):

      pop0  pop1  pop2

pop0  t1 0  t1 x  t1 x
      t2 0  t2 0  t2 x

pop1  t1 x  t1 0  t1 x
      t2 0  t2 0  t2 0

pop2  t1 x  t1 x  t1 0
      t2 x  t2 0  t2 0


Now, if we want to set migration matrix as the default (i.e. randomly
migrants from the existent populations) use the following:

      pop0   pop1    pop2

pop0  t1 0   t1 0.5  t1 0.5
      t2 0   t2 0    t2 1.0

pop1  t1 0.5 t1 0    t1 0.5
      t2 0   t2 0    t2 0

pop2  t1 0.5 t1 0.5  t1 0
      t2 1.0 t2 0    t2 0


Notice that the sum of each line should be 1 (or 0 if there are no
migrants entering the population):

      pop0   pop1    pop2

pop0  t1 0   t1 0.5  t1 0.5  = 1
      t2 0   t2 0    t2 1    = 1

pop1  t1 0.5 t1 0    t1 0.5  = 1
      t2 0   t2 0    t2 0    = 1

pop2  t1 0.5 t1 0.5  t1 0    = 1
      t2 1   t2 0    t2 0    = 1


Ok, so this is how to set the migration weights matrix.
---end---

In your case you should set the tree topology as:
2 1 0 2 0 or 5 1 0 2 0 99

the migration rates as:
3 0 10 (or other prior)
3 0 10 (or other prior)
0

0

and the migration matrix as:
1
0  1  0
0  0  0
1  0  0
0  0  0
0  0  0
0  0  0

I know it is far from simple, but I hope this will help you setting up the simulations.
Best,
Joao

Kritika Garg

unread,
Apr 26, 2016, 8:31:54 PM4/26/16
to popABC
Dear Joao,
                Thank you so much for your help.

Regards
Kritika

Kritika Garg

unread,
Dec 3, 2016, 4:27:02 PM12/3/16
to popABC
Dear Joao,
                  Thank you for you help. I would like to extent the above model and add another event wherein gene flow between populations ended ~10,000 generations before present. Could you please suggest how I can add another time event and stop migration.

Thank you

Regards
Kritika

On Monday, April 25, 2016 at 9:14:14 PM UTC+8, Joao Sollari Lopes wrote:
Reply all
Reply to author
Forward
0 new messages