案例一
IM20Mb.tpl
//Parameters for the coalescence simulation program : simcoal.exe
2 samples to simulate :
//Population effective sizes (number of genes)
NPOP1
NPOP2
//Samples sizes and samples age
20
30
//Growth rates: negative growth implies population expansion
0
0
//Number of migration matrices : 0 implies no migration between demes
2
//Migration matrix 0
0 MIG21
MIG12 0
//Migration matrix 1
0 0
0 0
//historical event: time, source, sink, migrants, new deme size, growth rate, migr mat index
1 historical event
TDIV 0 1 1 RESIZE 0 1
//Number of independent loci [chromosome]
1 0
//Per chromosome: Number of contiguous linkage Block: a block is a set of contiguous loci
1
//per Block:data type, number of loci, per gen recomb and mut rates
FREQ 1 0 2.5e-8e-8
IM20Mb.est
// Priors and rules file
// *********************
[PARAMETERS]
//#isInt? #name #dist.#min #max
//all N are in number of haploid individuals
1 ANCSIZE unif 100 100000 output
1 NPOP1 unif 100 100000 output
1 NPOP2 unif 100 100000 output
0 N1M21 logunif 1e-2 20 hide
0 N2M12 logunif 1e-2 20 hide
1 TDIV unif 100 20000 output
[COMPLEX PARAMETERS]
0 RESIZE = ANCSIZE/NPOP2 hide
0 MIG21 = N1M21/NPOP1 output
0 MIG12 = N2M12/NPOP2 output
run line
./ fsc27 -t IM20Mb.tpl -n100000 -d -e IM20Mb.est -M -L 40 -c6 -q
.tpl
中字母代表的是要估计的参数,有些给定的值如果在.est
文件中定义,也会重新估计。
.est
文件中文件规定了要估计的参数,个人理解是这些参数没有包含关系,如果有包含关系,可定义在COMPLEX PARAMETERS
中。
案例二
3POPIM20Mb.tpl
//Parameters for the coalescence simulation program : fastsimcoal.exe
3 samples to simulate :
//Population effective sizes (number of genes)
NPOPAF
2000000
2000000
//Samples sizes and samples age
20
20
20
//Growth rates : negative growth implies population expansion
0
R1
R1
//Number of migration matrices : 0 implies no migration between demes
2
//Migration matrix 0
0.0000 0.0000 0.0000
0.0000 0.0000 MIG
0.0000 MIG 0.0000
//Migration matrix 1
0 0 0
0 0 0
0 0 0
//historical event: time, source, sink, migrants, new deme size, growth rate, migr mat index
4 historical event
TDIV 2 0 1 1 0 1
TDIV 1 0 1 1 0 1
TBOT 0 0 0 RES1 0 1
TENDBOT 0 0 0 RES2 0 1
//Number of independent loci [chromosome]
1 0
//Per chromosome: Number of contiguous linkage Block: a block is a set of contiguous loci
1
//per Block:data type, number of loci, per gen recomb and mut rates
FREQ 1 0 2.5e-8
3POPIM20Mb.est
// Priors and rules file
// *********************
[PARAMETERS]
//#isInt? #name #dist.#min #max
//all Ns are in number of haploid individuals
1 ANCSIZE unif 1000 100000 output
1 NBOT unif 10 2000 output
1 NPOPAF unif 1000 100000 output
1 NPOPOOA unif 10 10000 output
1 TDIV unif 10 10000 output
1 TPLUSDIV unif 10 10000 hide
0 MIG logunif 1e-5 1e-2 output
[COMPLEX PARAMETERS]
1 TBOT = TDIV+TPLUSDIV output
0 RATIO_OOA_EA = NPOPOOA/2000000 hide
0 RTEA = log(RATIO_OOA_EA) hide
0 R1 = RTEA/TDIV hide
1 TENDBOT = TBOT+500 hide
0 RES1 = NBOT/NPOPAF hide
0 RES2 = ANCSIZE/NBOT hide
run line
./ fsc27 -t 3PopExpBot20Mb.tpl -n100000 -d -e 3PopExpBot20Mb.est -M -L40 -q --multiSFS -C10 -c8
p4NocpgSanYor4.tpl
//Parameters for the coalescence simulation program : simcoal.exe
3 samples to simulate : Exponential growth : 1000 to 100,000,000 started 3000 generations ago
//Population effective sizes (number of genes)
NSan
NYor
1000
//Samples sizes
12
44
1 1600
//Growth rates : negative growth implies population expansion
0
0
0
//Number of migration matrices : 0 implies no migration between demes
0
//historical event: time, source, sink, migrants, new deme size, new growth rate, migration matrix
index
6 historical event
TDMS 0 0 0 RES_SAN 0 0
TDMY 1 1 0 RES_YOR 0 0
TAdm 0 1 AYS 1 0 0
TAdm 1 0 ASY 1 0 0
TDIVSanYor 1 0 1 RES_AF 0 0
16000 2 0 1 RES_ANC 0 0
//Number of independent loci [chromosome]
1 0
//Per chromosome: Number of contiguous linkage Block: a block is a set of contiguous loci
1
//per Block:data type, number of loci, per gen recomb and mut rates
FREQ 1 0 1e-7
p4NocpgSanYor4.tpl
// Priors and rules file
// *********************
[PARAMETERS]
//#isInt? #name #dist.#min #max
//all Ns are in number of haploid individuals
1 NSan unif 1000 2e6 output
1 NYor unif 1000 2e6 output
1 NASan unif 1000 1e5 output
1 NAYor unif 1000 1e5 output
1 HSIZE unif 1000 1e5 output
1 ANCSIZE unif 1000 1e5 output
1 TDMS unif 10 500 output
1 TDMY unif 10 500 output
1 TAdm unif 10 500 output
1 TPlusAdm unif 1 5000 hide
0 AYS unif 0 0.2 output
0 ASY unif 0 0.2 output
[COMPLEX PARAMETERS]
1 TDIVSanYor = TAdm+TPlusAdm output
0 RES_SAN = NASan/NSan hide
0 RES_YOR = NAYor/NYor hide
0 RES_AF = HSIZE/NASan hide
0 RES_ANC = ANCSIZE/HSIZE hide
run line
./ fsc27 -t p4NocpgSanYor4.tpl -n100000 -d -e p4NocpgSanYor4.est -M -L 20 -a0 -A2 -q -0 -C2 -multiSFS