Post date: Jan 05, 2017 7:29:55 PM
GWA results show that color maps to 702.1 and 128 before the indel, whereas stripe maps to 702.1 and 128 before and after the inversion. Thus, if genomic change in FHA and the OGA experimental bugs is due mostly to color, we should see the biggest signal for 702.1 and just the left half of 128, whereas we should see a signal for all of 128 (and 702.1) if it is stripe. To test this I:
1. Re-estimated genomic change, but with scaffold 128 split in two pieces: 1-5 million bp (left) and > 7 million bp (see plot of coverage from whole genome data here). This is approximate. I then calculated mean and 95th quantile genomic change for each scaffold and the two parts of scaffold 128. Here are the plots (mean, 95thq). And the code (genomicChange.R, in /uufs/chpc.utah.edu/common/home/u6000989/projects/timema_fluct/genomic_change_dark_morph/popgen_fha) is below:
p11<-scan("pEM_fha2011.txt")
p13<-scan("pEM_fha2013.txt")
ids<-read.table("snpids.txt",header=F)
dp<-abs(p13-p11)
scmns<-tapply(X=dp,INDEX=ids[,2],mean)
scn<-tapply(X=is.na(dp)==FALSE,INDEX=ids[,2],sum)
## drop small scaffolds, too noisy
a<-which(scn > 500)
x<-cbind(scn[a],scmns[a])
## plot of mean change
pdf("fhaScafChange.pdf",width=7,height=7)
plot(x[,1],x[,2],xlab="no. SNPs",ylab="mean freq. change",cex.lab=1.4,cex.axis=1.2,ylim=c(0,0.028))
## scaf 128
points(x[3,1],x[3,2],col="blue",pch=19)
## scaf 702.1
points(x[13,1],x[13,2],col="red",pch=19)
lb<-5000000
ub<-7000000
left128<-which(ids[,2]==128 & ids[,3] < lb)
right128<-which(ids[,2]==128 & ids[,3] > ub)
mnl<-mean(dp[left128])
mnr<-mean(dp[right128])
points(length(left128),mnl,col="green",pch=19)
points(length(right128),mnr,col="orange",pch=19)
legend(15000,0.028,c("702.1","128","128-left","128-right"),pch=19,col=c("red","blue","green","orange"))
dev.off()
## plot of 95thq change
sc95q<-tapply(X=dp,INDEX=ids[,2],quantile,probs=0.95)
x<-cbind(scn[a],sc95q[a])
pdf("fhaScafChange95.pdf",width=7,height=7)
plot(x[,1],x[,2],xlab="no. SNPs",ylab="95th q. freq. change",cex.lab=1.4,cex.axis=1.2,ylim=c(0,0.1))
## scaf 128
points(x[3,1],x[3,2],col="blue",pch=19)
## scaf 702.1
points(x[13,1],x[13,2],col="red",pch=19)
lb<-5000000
ub<-7000000
left128<-which(ids[,2]==128 & ids[,3] < lb)
right128<-which(ids[,2]==128 & ids[,3] > ub)
mnl<-quantile(dp[left128],probs=0.95)
mnr<-quantile(dp[right128],probs=0.95)
points(length(left128),mnl,col="green",pch=19)
points(length(right128),mnr,col="orange",pch=19)
legend(15000,0.028,c("702.1","128","128-left","128-right"),pch=19,col=c("red","blue","green","orange"))
dev.off()
The left side of scaffold 128 showed much greater change than the right, consistent with selection primarily on color (rather than stripe).
2. I did the same thing for the OGA between-generation experiment (Science experiment). This is in uufs/chpc.utah.edu/common/home/u6000989/projects/timema_fluct/genomic_change_dark_morph/popgen_oga/. The relevant code is commands.R (similar to above). The results are similar, 128 left is the answer (mean, 95th quantile).