We want to know the length of a shared segment of DNA that could be observed with no recombination with some probability. The probability that a sequence of length \(L\) will have no recombination in one generation is \(P_L=(1-c)^L\) where \(c\) is the recombination rate per bp. Then, the probability that this locus will have no recombination for \(n\) generations is simply \(P_{Ln}=((1-c)^L)^n\). If we set that probability to some value \(P\) we can estimate the length of the segement for some value of \(n\) via: \(L=\frac{log(P_{Ln})}{n*log(1-c)}\).

rec<-function(power,gens,c){
 return(log(power)/(gens*log(1-c)))  
}

We now do this for a bunch of values of time for three values of the recombination rate, 1cM/Mb (1E-8 per bp or average-ish recombination), 0.1cM/Mb (low recombination), and 10cM/Mb (high recombination)

power=0.8
c=1E-8 #rec per bp

length1=sapply(1:2000*100,function(x) rec(power,x,c/10))/1000
length2=sapply(1:2000*100,function(x) rec(power,x,c))/1000
length3=sapply(1:2000*100,function(x) rec(power,x,c*10))/1000
g=1:2000*100/1000 #generations

Plot over whole range.

## Warning: plot type 'line' will be truncated to first character
## Warning: plot type 'line' will be truncated to first character
## Warning: "log" is not a graphical parameter
## Warning: plot type 'line' will be truncated to first character
## Warning: "log" is not a graphical parameter

plot of chunk unnamed-chunk-3

Plot over 1-5k year range.

## Warning: plot type 'line' will be truncated to first character
## Warning: plot type 'line' will be truncated to first character
## Warning: "log" is not a graphical parameter
## Warning: plot type 'line' will be truncated to first character
## Warning: "log" is not a graphical parameter

plot of chunk unnamed-chunk-4