Post date: May 28, 2015 10:5:55 PM
Conditions for the initial runs under a neutral model are in /labs/evolution/projects/popanc_sims/sims/runAdmixPopAnc1.pl. Another file in the same directory (runAdmixPopAnc2.pl) contains conditions for weak and strong selection. Here are the file contents (underdominance for both with L = 2 and s = 0.3 for strong and L = 20 and s = 0.03 for weak):
$nmarkersChr = 10001; ## number of markers per LG
$model = 'underdom'; ## form of selection: underdom or epistasis
$multadd = 'mult'; ## fitness with multiple loci is multiplicative 'mult' or additive
$gen = 0; ## no. of generations
$rep = 10; ## no. of replicates
$pop = 500; ## population size = sample size?
$mig = 0.0; ## migration rate
$nsel= 2; ## total no. of selected loci
$nselperchr= 2; ## no. of selected loci on each chromosome
$distselloci = 0.1; ## spacing between selected loci, if more than one per chrom.
$sel = 0.3; ## selection coefficient
$gen = 50;
$outfile = "admix_strsel_gens".$gen.".txt";
print "$outfile: $gen $sel $mig $pop\n";
open(OUTFILE, "> $outfile") or die "Couldn't open outfile\n";
print OUTFILE "model,stage,multadd,s,nselloci,nsellociperchr,distselloci,mig,gen,rep,ind,h,het,$loci\n";
close(OUTFILE);
system "admix $model viability $sel $nsel $nselperchr $distselloci $multadd $gen $rep $pop $mig $nmarkersChr $outfile";
$nsel= 20; ## total no. of selected loci
$nselperchr= 10; ## no. of selected loci on each chromosome
$distselloci = 0.05; ## spacing between selected loci, if more than one per chrom.
$sel = 0.03; ## selection coefficient
$gen = 50;
$outfile = "admix_weaksel_gens".$gen.".txt";
print "$outfile: $gen $sel $mig $pop\n";
open(OUTFILE, "> $outfile") or die "Couldn't open outfile\n";
print OUTFILE "model,stage,multadd,s,nselloci,nsellociperchr,distselloci,mig,gen,rep,ind,h,het,$loci\n";
close(OUTFILE);
system "admix $model viability $sel $nsel $nselperchr $distselloci $multadd $gen $rep $pop $mig $nmarkersChr $outfile";
I used the script simGenotypesFstSel.pl to parse these results as described for the neutral simulations. I then used reHeader.pl to add the proper header. Finally, I ran the popanc program on these data using the same conditions used for the neutral data sets. Here is an example:
cd /local/scratch/
sleep 5
popanc -o estpanc_weakselGens50Rep9Chain1.hdf5 -m 30000 -b 10000 -t 5 -n 4 -d 10 -s 1 -c 1.3 -u 10 -l 0.1 -a 0.1 -z 1 /labs/evolution/projects/popanc_sims/sims/selection/genoP0F_r9gen_weaksel_gens50.txt /labs/evolution/projects/popanc_sims/sims/selection/genoP1F_r9gen_weaksel_gens50.txt /labs/evolution/projects/popanc_sims/sims/selection/genoAdmixF_r9gen_weaksel_gens50.txt
scp estpanc_weakselGens50Rep9Chain1.hdf5 /labs/evolution/projects/popanc_sims/mcmc/