Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

interpPositions

Interpolate positions from one map to another


Description

On the basis of a pair of marker maps with common markers, take positions along one map and interpolate (or, past the terminal markers on a chromosome, extrapolate) their positions on the second map.

Usage

interpPositions(oldpositions, oldmap, newmap)

Arguments

oldpositions

A data frame with two columns: chr (chromosome identifiers) and pos (positions, along oldmap).

oldmap

An object of class "map"; see sim.map for details.

newmap

An object of class "map", with the same chromosomes and markers as oldmap.

Details

In this explanation, take oldmap and newmap to be the physical and genetic maps, respectively.

We use linear interpolation within each interval, assuming a constant recombination rate within the interval. Past the terminal markers, we use linear extrapolation, using the chromosome-wide average recombination rate.

Value

The input data frame, oldpositions, with an additional column newpos with the interpolated positions along newmap.

Author(s)

Karl W Broman, broman@wisc.edu

See Also

Examples

data(hyper)

# hyper genetic map
gmap <- pull.map(hyper)

# a fake physical map, with each chromosome starting at 0.
pmap <- shiftmap(rescalemap(gmap, 2))

# positions on pmap to determine location on gmap
tofind <- data.frame(chr=c(1, 5, 17, "X"), pos=c(220, 20, 105, 10))
rownames(tofind) <- paste("loc", 1:nrow(tofind), sep="")

interpPositions(tofind, pmap, gmap)

qtl

Tools for Analyzing QTL Experiments

v1.48-1
GPL-3
Authors
Karl W Broman <broman@wisc.edu> and Hao Wu, with ideas from Gary Churchill and Saunak Sen and contributions from Danny Arends, Robert Corty, Timothee Flutre, Ritsert Jansen, Pjotr Prins, Lars Ronnegard, Rohan Shah, Laura Shannon, Quoc Tran, Aaron Wolen, Brian Yandell, and R Core Team
Initial release
2021-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.