customMap: Custom recombination map

Description Usage Arguments Details Value See Also Examples

View source: R/map_constructors.R

Description

Create custom recombination maps for use in ibdsim().

Usage

1

Arguments

x

A data frame or matrix. See details for format specifications.

Details

The column names of x must include either

or

Upper-case letters are allowed in these names. The mb column should contain physical positions in megabases, while cm, male, female give the corresponding genetic position in centiMorgans.

Value

An object of class genomeMap.

See Also

uniformMap(), loadMap()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# A map including two chromosomes.
df1 = data.frame(chrom = c(1, 1, 2, 2),
                 mb = c(0, 2, 0, 5),
                 cm = c(0, 3, 0, 6))
map1 = customMap(df1)
map1

# Use columns "male" and "female" to make sex specific maps
df2 = data.frame(chrom = c(1, 1, 2, 2),
                 mb = c(0, 2, 0, 5),
                 male = c(0, 3, 0, 6),
                 female = c(0, 4, 0, 7))
map2 = customMap(df2)
map2

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