Description Usage Arguments Value Examples

Function to calculate recombination frequencies from distance based on three mapping functions. Morgan's, which assumes a linear relationship between distance and recombination frequency (inaccurate for large distances); Haldane's, the most common function, accounting for possible double recombinations between distant markers; and Kosambi's, which accounts for intereference between nearby recombinations. Kosambi's is used by default, as it tends to be the most biologically accurate.

1 | ```
r_from_dist(d, method = "kosambi")
``` |

`d` |
numeric, distance vector in cM. |

`method` |
character, one of the following: kosambi, haldane, morgan. Partial matching is allowed. |

a numeric vector of recombination frequencies.

1 2 3 4 5 6 7 8 9 | ```
d <- 1:100
kos <- r_from_dist(d, method = "k")
hal <- r_from_dist(d, method = "h")
mor <- r_from_dist(d, method = "m")
plot(d,mor,ylim = range(c(kos,hal,mor)),type = "l", col = 1)
points(d,hal,type = "l", col = 2)
points(d, kos, type = "l",col = 3)
legend("topright", legend = c("Morgan","Haldane","Kosambi"),col = 1:3,lty = 1)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.