Post date: Jun 26, 2015 9:41:1 PM
I ran some initial tests for the presence of genetic trade-offs for mung vs. lentil, Previously I generated null distributions for the expected change caused by drift between M and each L line, and the L lines vs. LR lines. Now I have formally calculated the quantile of the null distribution where the observed allele frequency differences/changes fall. I logit transformed the quantiles to accentuate the extreme values (quantiles) and plotted the quantiles for M vs. LX and LX vs LXR (one plot for L1/L1R, L2/L2R, and L3/L3R). High positive values indicate a large the allele frequency increase (relative to null expectations, this is for one of the two alleles at the locus), whereas large negative values indicate a large decrease in the allele frequency relative to null expectations. Thus, genetic trade-offs would show up as large positive values on the x-axis and large negative values on the y-axis or vice a versa, whereas conditional neutrality would show up as large positive or negative values on one axis but not the other. The red lines denote the 0.1th and 99.9th quantiles of the null distribution (logit transformed; rough guides for 'significance'). Numerous loci exhibit allele frequency changes that are hard to explain by drift. Many of these are exceptional in M to L or L to LR, but not both (i.e. possible conditional neutrality), but some are exceptional in opposite directions for M to L and L to LR, which suggests that these SNPs are tagging antagonistically pleoitropic functional variants (i.e. genetic trade-offs for host use exist in this system, but do not constitute all selected loci). The results are also interestingly different across lines, particularly with respect to the evidence for genetic trade-offs, which we have the best evidence for in L1 vs. L1R. This is pretty cool. Next I will try to put actual estimates of selection coefficients on these, and I want to compare the results for the 35 vs. 45 generation reversion lines (I have been focusing on the 45 generation ones).
Here is the R code (from sims2.R, which is in /home/zgompert/labs/evolution/projects/cmaclentil/popgen/SeedBeetleSim/ along with the tradeoffs*pdf plots):
## for p-values and first test of trade-offs
analyNullSimP<-function(p0=0.5,p1=0.5,t=100,ne=100,lower=TRUE){
fst<-1-(1-2/(2*ne))^t
alpha<-p0 * (1-fst)/fst
beta<-(1-p0) * (1-fst)/fst
pv<-pbeta(p1,alpha+0.001,beta+0.001,lower.tail=lower)
pv
}
## M v L1 v L1R, logit quantile
pL1<-read.table("p_L1-F100.txt",header=FALSE,sep=",")
pL1R<-read.table("p_L1R-F46.txt",header=FALSE,sep=",")
p0<-pL1[,1]
p1<-pL1R[,1]
pv<-analyNullSimP(p0,p1,t=84,ne=455.5,lower=TRUE)
tlpv<-log(pv/(1-pv))
pM<-read.table("p_M-14.txt",header=FALSE,sep=",")
p0<-pM[,1]
p1<-pL1[,1]
mpv<-analyNullSimP(p0,p1,t=231,ne=454.5,lower=TRUE)
tmpv<-log(mpv/(1-mpv))
pdf("tradeoffsM-L1-L1R.pdf",width=6,height=6)
par(mar=c(5,5,0.5,0.5))
plot(tmpv,tlpv,pch=19,col="darkgray",cex=0.5,xlab="logit(Pr[M->L1])",ylab="logit(Pr[L1->L1R])",cex.lab=1.4,cex.axis=1.1)
abline(h=c(7,-7),lty=3,col="red",lwd=1.3)
abline(v=c(7,-7),lty=3,col="red",lwd=1.3)
abline(h=0,lty=2)
abline(v=0,lty=2)
dev.off()
## M v L2 v L2R, logit quantile
pL2<-read.table("p_L2-F87.txt",header=FALSE,sep=",")
pL2R<-read.table("p_L2R-F45.txt",header=FALSE,sep=",")
p0<-pL2[,1]
p1<-pL2R[,1]
pv<-analyNullSimP(p0,p1,t=84,ne=437.5,lower=TRUE)
tlpv<-log(pv/(1-pv))
pM<-read.table("p_M-14.txt",header=FALSE,sep=",")
p0<-pM[,1]
p1<-pL2[,1]
mpv<-analyNullSimP(p0,p1,t=194,ne=525,lower=TRUE)
tmpv<-log(mpv/(1-mpv))
pdf("tradeoffsM-L2-L2R.pdf",width=6,height=6)
par(mar=c(5,5,0.5,0.5))
plot(tmpv,tlpv,pch=19,col="darkgray",cex=0.5,xlab="logit(Pr[M->L2])",ylab="logit(Pr[L2->L2R])",cex.lab=1.4,cex.axis=1.1)
abline(h=c(7,-7),lty=3,col="red",lwd=1.3)
abline(v=c(7,-7),lty=3,col="red",lwd=1.3)
abline(h=0,lty=2)
abline(v=0,lty=2)
dev.off()
## M v L3 v L3R, logit quantile
pL3<-read.table("p_L3-F85.txt",header=FALSE,sep=",")
pL3R<-read.table("p_L3R-F45.txt",header=FALSE,sep=",")
p0<-pL3[,1]
p1<-pL3R[,1]
pv<-analyNullSimP(p0,p1,t=85,ne=937,lower=TRUE)
tlpv<-log(pv/(1-pv))
pM<-read.table("p_M-14.txt",header=FALSE,sep=",")
p0<-pM[,1]
p1<-pL3[,1]
mpv<-analyNullSimP(p0,p1,t=189,ne=549.5,lower=TRUE)
tmpv<-log(mpv/(1-mpv))
pdf("tradeoffsM-L3-L3R.pdf",width=6,height=6)
par(mar=c(5,5,0.5,0.5))
plot(tmpv,tlpv,pch=19,col="darkgray",cex=0.5,xlab="logit(Pr[M->L3])",ylab="logit(Pr[L3->L3R])",cex.lab=1.4,cex.axis=1.1)
abline(h=c(7,-7),lty=3,col="red",lwd=1.3)
abline(v=c(7,-7),lty=3,col="red",lwd=1.3)
abline(h=0,lty=2)
abline(v=0,lty=2)
dev.off()