pick_marker_subset: Identify the largest subset of markers that are some distance...

Description Usage Arguments Details Value References Examples

View source: R/pick_marker_subset.R

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

1
pick_marker_subset(map, min_d = 1, weights = NULL)

Arguments

map

Either a vector of marker positions, or a list of such vectors (one vector per chromosome)

min_d

Minimum distance between markers

weights

An object of the same shape as map: either a vector of the same length, or a list with the same length and whose components are the same lengths.

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

The selected subset of marker positions, either as a vector or a list of vectors, according to the nature of map.

References

Broman KW, Weber JL (1999) Method for constructing confidently ordered linkage maps. Genet Epidemiol 16:337–343.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# load qtl2geno package for data and genoprob calculation
library(qtl2geno)

# read data
grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2geno"))

# grap genetic map
gmap <- grav2$gmap

# subset to markers that are >= 1 cM apart
gmap_sub <- pick_marker_subset(gmap, 1)

rqtl/qtl2scan documentation built on May 28, 2019, 2:36 a.m.