Post date: Jan 23, 2017 12:25:12 AM
path: /uufs/chpc.utah.edu/common/home/u0795641/projects/cmac_AR/popgen/ne
1. Create in file to use in program 'varne'. One column will contain allele frequency estimates, the second column will be 2N (twice number of individuals).
cut -f 1 -d "," ../AlleleFreq/L14-F1_p.txt | perl -p -i -e 's/^(\S+)/\1 96/' > in_p_L14-F1.txt
2. Files to be analyzed:
P to F16 (for lines A and B)
P to F1 to F2 to F3
F3 to split of lines (F5)
F6 to F16
3.
P to F4
hat{Ne} = 8.81952
median of posterior = 10
50% credible intervals = 10, 10
90% credible intervals = 10, 10
95% credible intervals = 10, 10
F4 to F16A
hat{Ne} = 68.8381
median of posterior = 68.9157
50% credible intervals = 68.1928, 69.676
90% credible intervals = 67.1106, 70.7861
95% credible intervals = 66.6927, 71.0525
F4 to F16B
hat{Ne} = 56.7812
median of posterior = 56.7703
50% credible intervals = 56.2467, 57.3822
90% credible intervals = 55.4731, 58.1641
95% credible intervals = 55.2384, 58.3542
P to F16A
../../../../../u0795641/source/VarNe/varne -a in_p_L14-P.txt -b in_p_L14A-F16.txt -l 21342 -t 16 -n 2000 -x 1000
hat{Ne} = 28.6953
median of posterior = 28.6927
50% credible intervals = 28.4638, 28.9185
90% credible intervals = 28.1287, 29.2548
95% credible intervals = 27.9956, 29.3386
P to F16B
../../../../../u0795641/source/VarNe/varne -a in_p_L14-P.txt -b in_p_L14B-F16.txt -l 21342 -t 16 -n 2000 -x 1000
hat{Ne} = 27.2585
median of posterior = 27.2515
50% credible intervals = 27.0539, 27.4795
90% credible intervals = 26.7613, 27.7863
95% credible intervals = 26.6787, 27.9086
P to F3
../../../../../u0795641/source/VarNe/varne -a in_p_L14-P.txt -b in_p_L14-F3.txt -l 21342 -t 3 -n 2000 -x 1000
hat{Ne} = 2.82242
median of posterior = 10
50% credible intervals = 10, 10
90% credible intervals = 10, 10
95% credible intervals = 10, 10
P to F5A
../../../../../u0795641/source/VarNe/varne -a in_p_L14-P.txt -b in_p_L14A-F5.txt -l 21342 -t 5 -n 2000 -x 1000
hat{Ne} = 9.65711
median of posterior = 10
50% credible intervals = 10, 10
90% credible intervals = 10, 10
95% credible intervals = 10, 10
P to F5B
../../../../../u0795641/source/VarNe/varne -a in_p_L14-P.txt -b in_p_L14B-F5.txt -l 21342 -t 5 -n 2000 -x 1000
hat{Ne} = 10.5883
median of posterior = 10.5972
50% credible intervals = 10.5031, 10.6915
90% credible intervals = 10.3677, 10.8198
95% credible intervals = 10.3315, 10.8555
P to F1
../../../../../u0795641/source/VarNe/varne -a in_p_L14-P.txt -b in_p_L14-F1.txt -l 21342 -t 1 -n 2000 -x 1000
hat{Ne} = 38.7304
median of posterior = 38.6915
50% credible intervals = 37.8394, 39.5825
90% credible intervals = 36.5046, 40.8912
95% credible intervals = 36.2205, 41.2765
F1 to F2
../../../../../u0795641/source/VarNe/varne -a in_p_L14-F1.txt -b in_p_L14-F2.txt -l 21342 -t 1 -n 2000 -x 1000
hat{Ne} = 20.9976
median of posterior = 20.9987
50% credible intervals = 20.6724, 21.3347
90% credible intervals = 20.2937, 21.8546
95% credible intervals = 20.0757, 21.9416
F2 to F3
../../../../../u0795641/source/VarNe/varne -a in_p_L14-F2.txt -b in_p_L14-F3.txt -l 21342 -t 1 -n 2000 -x 1000
hat{Ne} = 4.71767
median of posterior = 10
50% credible intervals = 10, 10
90% credible intervals = 10, 10
95% credible intervals = 10, 10
F3 to F5A
../../../../../u0795641/source/VarNe/varne -a in_p_L14-F3.txt -b in_p_L14A-F5.txt -l 21342 -t 2 -n 2000 -x 1000
hat{Ne} = 38.8255
median of posterior = 38.8241
50% credible intervals = 38.2358, 39.4364
90% credible intervals = 37.4837, 40.3289
95% credible intervals = 37.1724, 40.6489
F3 to F5B
../../../../../u0795641/source/VarNe/varne -a in_p_L14-F3.txt -b in_p_L14B-F5.txt -l 21342 -t 2 -n 2000 -x 1000
hat{Ne} = 83.7592
median of posterior = 83.938
50% credible intervals = 82.0481, 85.7104
90% credible intervals = 79.4866, 88.4526
95% credible intervals = 78.9852, 89.5436
F5A to F16A
../../../../../u0795641/source/VarNe/varne -a in_p_L14A-F5.txt -b in_p_L14A-F16.txt -l 21342 -t 11 -n 2000 -x 1000
hat{Ne} = 71.809
median of posterior = 71.8757
50% credible intervals = 71.0673, 72.6438
90% credible intervals = 69.9512, 73.7517
95% credible intervals = 69.6415, 73.9951
F5B to F16B
../../../../../u0795641/source/VarNe/varne -a in_p_L14B-F5.txt -b in_p_L14B-F16.txt -l 21342 -t 11 -n 2000 -x 1000
hat{Ne} = 60.8046
median of posterior = 60.8915
50% credible intervals = 60.256, 61.3981
90% credible intervals = 59.3626, 62.3391
95% credible intervals = 59.0943, 62.6368
## R, graph of Ne estimates
ne <- matrix(NA, nrow=3, ncol=3)
## P to F4
ne[,1] <- 10
## F4 to F16A
ne[1,2] <- 68.9157
ne[2,2] <- 66.6927
ne[3,2] <- 71.0525
## F4 to F16B
ne[1,3] <- 56.7703
ne[2,3] <- 55.2384
ne[3,3] <- 58.3542
## just cuz
ne <- t(ne)
pdf('Ne.pdf', width=9,height=9)
par(mar=c(5,5,2,2))
barplot(ne[1,], col='grey', names=c('P to F4', 'F4 to F16A', 'F4 to F16B'), ylab='Ne', cex.lab=1.5, cex.names=1.5, cex.axis=1.25, ylim=c(0,75))
title('Estimates of Ne')
segments(x0=c(.6,1.87, 3.08),y0 = c(10, 66.6927, 55.2384), y1=c(10, 71.0524, 58.3542), col = "black")
dev.off()
## don't use this, use bar graph below
pdf('Ne.pdf', width=9, height=9)
plot(1:5, ne[,1], ylim=c(0,80), ylab='Ne',xlab='Time point differences', xaxt='n', cex=.75, main='Estimates of Ne')
segments(1:5, ne[,2], 1:5, ne[,3], lwd=1, lty=1, col='black')
axis(1, at=1:5, labels=c('P to F4', 'F4 to F16A', 'F4 to F16B', 'P to F16A', 'P to F16B'))
dev.off()