Description Usage Arguments Details Value References Examples
View source: R/pick_marker_subset.R
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.
1 | pick_marker_subset(map, min_d = 1, weights = NULL)
|
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 |
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.
The selected subset of marker positions, either as a vector
or a list of vectors, according to the nature of map
.
Broman KW, Weber JL (1999) Method for constructing confidently ordered linkage maps. Genet Epidemiol 16:337–343.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.