Description Usage Arguments Value Examples
Convert between physical position (in megabases) and genetic position (centiMorgan) given a chromosome map. Linear extrapolation is used to convert positions between map points.
1 | convertPos(Mb = NULL, cM = NULL, map)
|
Mb |
A vector of physical positions (in Mb), or NULL. |
cM |
A vector of genetic positions (in cM), or NULL. |
map |
A data frame with columns |
A vector of the same length as the input.
1 2 3 4 5 6 7 8 9 10 11 | # Chromosome 1 of the built-in recombination map
map = loadMap(chrom = 1)[[1]]
head(map$male)
# Conversion Mb -> cM
phys = 1:5
gen = convertPos(Mb = phys, map = map$male)
gen
# Convert back (note the first position, which was outside of map)
convertPos(cM = gen, map = map$male)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.