est_map: Estimate genetic maps

View source: R/est_map.R

est_mapR Documentation

Estimate genetic maps

Description

Uses a hidden Markov model to re-estimate the genetic map for an experimental cross, with possible allowance for genotyping errors.

Usage

est_map(
  cross,
  error_prob = 0.0001,
  map_function = c("haldane", "kosambi", "c-f", "morgan"),
  lowmem = FALSE,
  maxit = 10000,
  tol = 0.000001,
  quiet = TRUE,
  save_rf = FALSE,
  cores = 1
)

Arguments

cross

Object of class "cross2". For details, see the R/qtl2 developer guide.

error_prob

Assumed genotyping error probability

map_function

Character string indicating the map function to use to convert genetic distances to recombination fractions.

lowmem

If FALSE, precalculate initial and emission probabilities, and at each iteration calculate the transition matrices for a chromosome; potentially a lot faster but using more memory. Needs to be tailored somewhat to cross type. For example, multi-way RIL may need to reorder the transition matrix according to cross order, and AIL and DO need separate transition matrices for each generation.

maxit

Maximum number of iterations in EM algorithm.

tol

Tolerance for determining convergence

quiet

If FALSE, print progress messages.

save_rf

If TRUE, save the estimated recombination fractions as an attribute ("rf") of the result.

cores

Number of CPU cores to use, for parallel calculations. (If 0, use parallel::detectCores().) Alternatively, this can be links to a set of cluster sockets, as produced by parallel::makeCluster().

Details

The map is estimated assuming no crossover interference, but a map function (by default, Haldane's) is used to derive the genetic distances.

Value

A list of numeric vectors, with the estimated marker locations (in cM). The location of the initial marker on each chromosome is kept the same as in the input cross.

Examples

grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2"))

gmap <- est_map(grav2, error_prob=0.002)

qtl2 documentation built on May 29, 2024, 11:46 a.m.