Post date: Jan 06, 2017 3:1:58 PM
1. Extract genotype likelihoods and estimate allele frequencies with estpEM
We need allele frequencies for all individuals and the survivors alone. First, I rand my vcf2gl script to convert to gls including all individuals (from /uufs/chpc.utah.edu/common/home/u6000989/projects/timema_fluct/genomic_change_dark_morph/variants):
perl ../scripts/vcf2gl.pl 0.01 lgvar_filtered1X_tcrExperimentVariants.vcf
Then, I split this into gl files for all bugs, all survivors, all A bugs, all C bugs, all A survivors and all C survivors:
perl splitPops.pl ecol_maf1pct.gl
This generates all of the ecol_*gl files in the variants subdirectory.
Finally, I ran estpEM to get allele frequencies for all of the subsets:
perl runEstpEM.pl ecol_[acsAC]*gl
This uses the default options of convergence tolerance = 0.001 and 20 maximum EM iterations. The resulting p_ecol*txt allele frequency files with 6,175,495 SNPs are in /uufs/chpc.utah.edu/common/home/u6000989/projects/timema_fluct/genomic_change_dark_morph/popgen_ecol_letters_exp/
2. Genomic change during the experiment:
As in the other experiment and FHA, I calculated genomic change by scaffold for all bugs, only those on A, only those on C, and between A and C survivors. See commands.R for details. Once again, and in all comparisons 702.1 and 128 left stood out. This was odd as there were few dark morphs. Further investigation showed that this was (in part) because these are high diversity regions and the variance in allele frequency is proportional to 2pq. Indeed change and 2pq were highly correlated (r > 0.8). I then fit simple linear models for change as a function of 2pq. The results suggest change relative to diversity was high for these regions in general, and gave results that made sense for stripe (128-right stood out in divergence but not at all for all bugs combined). So, drift and selection could be contributing to this pattern, though either way the paradox of high change/high diversity not being sustaniable remains (without balancing selection).
P.S. Here are plots of residual change controlling for (via linear regression) diversity: residual mean, residual 95q.