View source: R/probs_to_grid.R
probs_to_grid | R Documentation |
Subset genotype probability array (from calc_genoprob()
to a grid of pseudomarkers along each chromosome.
probs_to_grid(probs, grid)
probs |
Genotype probabilities as output from
|
grid |
List of logical vectors that indicate which positions are on the grid and should be retained. |
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.
An object of class "calc_genoprob"
, like the input, subset to just include
pseudomarkers along a grid. See calc_genoprob()
.
calc_grid()
, map_to_grid()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.