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

map_to_grid

Subset a map to positions on a grid


Description

Subset a map object to the locations on some grid.

Usage

map_to_grid(map, grid)

Arguments

map

A list of vectors of marker positions.

grid

A list of logical vectors (aligned with map), with TRUE indicating the position is on the grid.

Details

This is generally for the case of a map created with insert_pseudomarkers() with step>0 and stepwidth="fixed", so that the pseudomarkers form a grid along each chromosome.

Value

Same list as input, but subset to just include pseudomarkers along a grid.

See Also

Examples

grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2"))
map_w_pmar <- insert_pseudomarkers(grav2$gmap, step=1)
sapply(map_w_pmar, length)
grid <- calc_grid(grav2$gmap, step=1)
map_sub <- map_to_grid(map_w_pmar, grid)
sapply(map_sub, length)

qtl2

Quantitative Trait Locus Mapping in Experimental Crosses

v0.24
GPL-3
Authors
Karl W Broman [aut, cre] (<https://orcid.org/0000-0002-4914-6671>), R Core Team [ctb]
Initial release
2020-12-16

We don't support your browser anymore

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