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

pickMarkerSubset

Identify the largest subset of markers that are some distance apart


Description

Identify the largest subset of markers for which no two adjacent markers are separated by less than some specified distance; if weights are provided, find the marker subset for which the sum of the weights is maximized.

Usage

pickMarkerSubset(locations, min.distance, weights)

Arguments

locations

A vector of marker locations.

min.distance

Minimum distance between adjacent markers in the chosen subset.

weights

(Optional) vector of weights for the markers. If missing, we take weights == 1.

Details

Let d[i] be the location of marker i, for i in 1, …, M. We use the dynamic programming algorithm of Broman and Weber (1999) to identify the subset of markers i[1], …, i[k] for which d(i[j+1]) - d(i[j]) <= min.distance and sum w(i[j]) is maximized.

If there are multiple optimal subsets, we pick one at random.

Value

A vector of marker names.

Author(s)

Karl W Broman, broman@wisc.edu

References

Broman, K. W. and Weber, J. L. (1999) Method for constructing confidently ordered linkage maps. Genet. Epidemiol., 16, 337–343.

See Also

Examples

data(hyper)

# subset of markers on chr 4 spaced >= 5 cM
pickMarkerSubset(pull.map(hyper)[[4]], 5)

# no. missing genotypes at each chr 4 marker
n.missing <- nmissing(subset(hyper, chr=4), what="mar")

# weight by -log(prop'n missing), but don't let 0 missing go to +Inf
wts <- -log( (n.missing+1) / (nind(hyper)+1) )

# subset of markers on chr 4 spaced >= 5 cM, with weights = -log(prop'n missing)
pickMarkerSubset(pull.map(hyper)[[4]], 5, wts)

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.