probs_to_grid {qtl2}R Documentation

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

calc_grid(), map_to_grid()

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)

[Package qtl2 version 0.36 Index]