calc_grid: Calculate indicators of which marker/pseudomarker positions...

Description Usage Arguments Details Value See Also Examples

View source: R/calc_grid.R

Description

Construct vectors of logical indicators that indicate which positions correspond to locations along a grid

Usage

1
calc_grid(map, step = 0, off_end = 0, tol = 0.01)

Arguments

map

A list of numeric vectors; each vector gives marker positions for a single chromosome.

step

Distance between pseudomarkers and markers; if step=0 no pseudomarkers are inserted.

off_end

Distance beyond terminal markers in which to insert pseudomarkers.

tol

Tolerance for determining whether a pseudomarker would duplicate a marker position.

Details

The function insert_pseudomarkers(), with stepwidth="fixed", will insert a grid of pseudomarkers, to a marker map. The present function gives a series of TRUE/FALSE vectors that indicate which positions fall on the grid. This is for use with probs_to_grid(), for reducing genotype probabilities, calculated with calc_genoprob(), to just the positions on the grid. The main value of this is to speed up genome scan computations in the case of very dense markers, by focusing on just a grid of positions rather than on all marker locations.

Value

A list of logical (TRUE/FALSE) vectors that indicate, for a marker/pseudomarker map created by insert_pseudomarkers() with step>0 and stepwidth="fixed", which positions correspond to he locations along the fixed grid.

See Also

insert_pseudomarkers(), probs_to_grid(), map_to_grid()

Examples

1
2
3
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))
gmap_w_pmar <- insert_pseudomarkers(iron$gmap, step=1)
grid <- calc_grid(iron$gmap, step=1)

qtl2 documentation built on Oct. 18, 2021, 1:06 a.m.