convertPos | R Documentation |
Convert between physical position (in megabases) and genetic position (centiMorgan) given a chromosome map. Linear extrapolation is used to convert positions between map points.
convertPos(
chrom = NULL,
Mb = NULL,
cM = NULL,
map = "decode19",
sex = c("average", "male", "female")
)
chrom |
(Optional) A vector of chromosome labels. |
Mb |
A vector of physical positions (in Mb), or NULL. |
cM |
A vector of genetic positions (in cM), or NULL. |
map |
A |
sex |
Either "average", "male" or "female". |
A vector of the same length as the input.
# 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, sex = "male")
gen
# Convert back (note the first position, which was outside of map)
convertPos(cM = gen, map = map, sex = "male")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.