gchen98 / macs

Automatically exported from code.google.com/p/macs
16 stars 6 forks source link

Simulate admixture with two source population at time T #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Dr. Chen,

I want to simulate a single event of admixture with two source populations 
using macs. I attach a pdf with a picture of the model. 

I have used macs previously but I am having trouble writing the correct 
command. It would seem that the -es option would be useful, but it only takes 
into account admixture from one population, instead of two. 

Any help would be appreciated. 

Consuelo Quinto 

Original issue reported on code.google.com by cdqui...@email.arizona.edu on 15 Feb 2015 at 3:45

Attachments:

GoogleCodeExporter commented 9 years ago
Have you tried this in ms before? The syntax should be the same. Basically 
you'll want to declare three populations here with the -I parameter.  At T2, 
you'll put an -ej event for a join and then at T1 another -ej event for the 
last join. I'm puzzled as to your N3 population.  That shouldn't pop out of 
nowhere and should coalesce with something in the past. It may be instructive 
to show you a command that maps to Figure 4 of attached.

macs 718 100000 -r .0006 -t .001 -I 3 176 170 372 0 -m 2 1 1 -m 3 1 .312 -m 3 2 
1.244 -n 1 1.4474 -g 2 0.38 -g 3 0.48 -eg .0230000 2 0 -eg .0230001 3 0 -ej 
.0230002 3 2 -em .0230003 2 1 6 -en .0230004 2 .1861 -ej .051 2 1 -en .148 1 
.731

Original comment by gche...@gmail.com on 18 Feb 2015 at 10:54

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for your answer and the example. 

I wrote two commands to create the admixed population (number 3 in my example), 
using the migration and the population split options. 

-using migration between pop 2 and 3:
macs ...-I 4 N1 N2 N3 N4 ... -em T3 2 3 1-pADM*4N0 -em T3 2 3 0 -ej T3 3 4 -ej 
T2 2 1 -ej T1 1 4 

-using population split: 
macs ... -I 3 N1 N2 N4 -es T3 2 1-pADM (creating population 3 in my model, 
although it would be 4 in macs) 
-ej T3 4 3 
-ej T2 2 1 
-ej T1 1 3 

Would these two options generate similar results?  

Original comment by conij...@gmail.com on 19 Feb 2015 at 6:09

cdquinto commented 8 years ago

Hello, I come back with a question regarding the -es option to simulate admixture.

I have the following model: model Population ID: 1: YRI 2: CEU 3: CHB 4: NAT 5: IBS 6: MEX

I wrote this command:

macs 102 9807 -t 0.0015849 -r 0.00063396 -h 1e5 -I 6 6 15 17 16 26 22 -n 1 4.00864407849 -n 2 2.48312196353 -n 3 0.266830714872 -n 4 4.00864407849 -n 5 0.248785412329 -n 6 4.67291311755 -es 0.000299703451322 6 0.961 (at time Tadmixture, 1-p equals 0.961) -ej 0.000299803451322 7 5 (at time Tadmixture) -ej 0.000301703451322 6 4 (at time Tadmixture) -ej 0.00968515363745 4 3 -ej 0.0160420215786 5 2 -ej 0.0198727049025 3 2 -en 0.0198727059025 2 0.1347719099 -ej 0.0296198498328 2 1 -en 0.0327465455234 1 1 -R recomb_map_regions_trunc_all/region_2_chr1_trunc.txt

This code generates data, but I get the following warning: WARNING: The pop IDs used in pop join is greater than the number specified in -I. You must have a split event before this join event.

Is this the correct way to code the model?

Thanks for the help.