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

probs_to_grid

Subset genotype probability array to pseudomarkers on a grid


Description

Subset genotype probability array (from calc_genoprob() to a grid of pseudomarkers along each chromosome.

Usage

probs_to_grid(probs, grid)

Arguments

probs

Genotype probabilities as output from calc_genoprob() with stepwidth="fixed".

grid

List of logical vectors that indicate which positions are on the grid and should be retained.

Details

This only works if calc_genoprob() was run with stepwidth="fixed", so that the genotype probabilities were calculated at a grid of markers/pseudomarkers. When this is the case, we omit all but the probabilities on this grid. Use calc_grid() to find the grid positions.

Value

An object of class "calc_genoprob", like the input, subset to just include pseudomarkers along a grid. See calc_genoprob().

See Also

Examples

grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2"))
map_w_pmar <- insert_pseudomarkers(grav2$gmap, step=1)
probs <- calc_genoprob(grav2, map_w_pmar, error_prob=0.002)
sapply(probs, dim)
grid <- calc_grid(grav2$gmap, step=1)
probs_sub <- probs_to_grid(probs, grid)
sapply(probs_sub, dim)

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.