sim.map: Simulate a genetic map

View source: R/simulate.R

sim.mapR Documentation

Simulate a genetic map

Description

Simulate the positions of markers on a genetic map.

Usage

sim.map(len=rep(100,20), n.mar=10, anchor.tel=TRUE,
        include.x=TRUE, sex.sp=FALSE, eq.spacing=FALSE)

Arguments

len

A vector specifying the chromosome lengths (in cM)

n.mar

A vector specifying the number of markers per chromosome.

anchor.tel

If true, markers at the two telomeres will always be included, so if n.mar = 1 or 2, we'll give just the two telomeric markers.

include.x

Indicates whether the last chromosome should be considered the X chromosome.

sex.sp

Indicates whether to create sex-specific maps, in which case the output will be a vector of 2-row matrices, with rows corresponding to the maps for the two sexes.

eq.spacing

If TRUE, markers will be equally spaced.

Details

Aside from the telomeric markers, marker positions are simulated as iid Uniform(0,L). If len or n.mar has just one element, it is expanded to the length of the other argument. If they both have just one element, only one chromosome is simulated.

If eq.spacing is TRUE, markers are equally spaced between 0 and L. If anchor.tel is FALSE, telomeric markers are not included.

Value

A list of vectors, each specifying the locations of the markers. Each component of the list is given class A or X, according to whether it is autosomal or the X chromosome.

Author(s)

Karl W Broman, broman@wisc.edu

See Also

sim.cross, plotMap, replace.map, pull.map

Examples

# simulate 4 autosomes, each with 10 markers
map <- sim.map(c(100,90,80,40), 10, include.x=FALSE)
plotMap(map)

# equally spaced markers
map2 <- sim.map(c(100,90,80,40), 10, include.x=FALSE, eq.spacing=TRUE)
plot(map2)

qtl documentation built on Sept. 11, 2024, 5:43 p.m.