View source: R/map_constructors.R
loadMap | R Documentation |
This function loads one of the built-in genetic maps. Currently, the only option is a detailed human recombination map, based on the publication by Halldorsson et al. (2019).
loadMap(map = "decode19", chrom = 1:22, uniform = FALSE, sexAverage = FALSE)
map |
The name of the wanted map, possibly abbreviated. Default: "decode19". |
chrom |
A vector containing a subset of the numbers 1,2,...,23,
indicating which chromosomes to load. As a special case, |
uniform |
A logical. If FALSE (default), the complete inhomogeneous map is used. If TRUE, a uniform version of the same map is produced, i.e., with the correct physical range and genetic lengths, but with constant recombination rates along each chromosome. |
sexAverage |
A logical, by default FALSE. If TRUE, a sex-averaged map is returned, with equal recombination rates for males and females. |
For reasons of speed and efficiency, the map published by map Halldorsson et al. (2019) has been thinned down to ~14,000 data points.
NOTE: The built-in map was updated in version 2.3.0, adding more accurate
physical chromosome endpoints. While still based on Halldorsson et al.
(2019), the new version also uses a better thinning algorithm, allowing to
reduce the number of data points from ~38,000 to ~14,000 without losing
accuracy. The old version is available as a separate dataset
legacy_decode19
for backwards reproducibility.
By setting uniform = TRUE
, a uniform version of the map is returned, in
which each chromosome has the same genetic lengths as in the original, but
with constant recombination rates. This gives much faster simulations and may
be preferable in some applications.
An object of class genomeMap
, which is a list of chromMap
objects. A chromMap
is a list of two matrices, named "male" and "female",
with various attributes:
physStart
: The first physical position (Mb) on the chromosome covered
by the map
physEnd
: The last physical position (Mb) on the chromosome covered by
the map
physRange
: The physical map length (Mb), equal to physEnd - physStart
mapLen
: A vector of length 2, containing the centiMorgan lengths of the
male and female strands
chrom
: A chromosome label
Xchrom
: A logical. This is checked by ibdsim()
and other function, to
select mode of inheritance
Halldorsson et al. Characterizing mutagenic effects of recombination through a sequence-level genetic map. Science (2019).
uniformMap()
, customMap()
# By default, the complete map of all 22 autosomes is returned
loadMap()
# Uniform version
m = loadMap(uniform = TRUE)
m
# Check chromosome 1
m1 = m[[1]]
m1
m1$male
m1$female
# The X chromosome
loadMap(chrom = "X")[[1]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.