loadMap: Load a built-in genetic map

Description Usage Arguments Details Value References See Also Examples

View source: R/map_constructors.R

Description

This function loads one of the built-in genetic maps. Currently, the available map is based on the publication by Halldorsson et al. (2019).

Usage

1
loadMap(map = "decode19", chrom = 1:22, uniform = FALSE, sexAverage = FALSE)

Arguments

map

The name of the wanted map, possibly abbreviated. Currently, the only valid choice is "decode19" (default).

chrom

A numeric vector indicating which chromosomes to load. Default: 1:22 (the autosomes).

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 lengths, but constant recombination rate 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.

Details

For reasons of speed and efficiency, the built-in map is a thinned version of the published map (Halldorsson et al., 2019), keeping around 60 000 data points.

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.

Value

An object of class genomeMap.

References

Halldorsson et al. Characterizing mutagenic effects of recombination through a sequence-level genetic map. Science 363, no. 6425 (2019).

See Also

uniformMap(), customMap()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# By default, the complete map of all 22 autosomes is returned
loadMap()

# Uniform version
m = loadMap(uniform = TRUE)

# Check chromosome 1
m1 = m[[1]]
m1$male
m1$female

ibdsim2 documentation built on Nov. 13, 2020, 5:06 p.m.