calc_genoprob: Calculate conditional genotype probabilities

Description Usage Arguments Details Value Examples

Description

Uses a hidden Markov model to calculate the probabilities of the true underlying genotypes given the observed multipoint marker data, with possible allowance for genotyping errors.

Usage

1
2
3
calc_genoprob(cross, step = 0, off_end = 0, stepwidth = c("fixed", "max"),
  pseudomarker_map, error_prob = 0.0001, map_function = c("haldane",
  "kosambi", "c-f", "morgan"), quiet = TRUE, n_cores = 1)

Arguments

cross

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

step

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

off_end

Distance beyond terminal markers in which to insert pseudomarkers.

stepwidth

Indicates whether to use a fixed grid (stepwidth="fixed") or to use the maximal distance between pseudomarkers to ensure that no two adjacent markers/pseudomarkers are more than step apart.

pseudomarker_map

A map of pseudomarker locations; if provided the step, off_end, and stepwidth arguments are ignored.

error_prob

Assumed genotyping error probability

map_function

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

quiet

If FALSE, print progress messages.

n_cores

Number of CPU cores to use, for parallel calculations. (If 0, use detectCores.)

Details

Let O[k] denote the observed marker genotype at position k, and g[k] denote the corresponding true underlying genotype.

We use the forward-backward equations to calculate a[k][v] = log Pr(O[1], …, O[k], g[k] = v) and b[k][v] = log Pr(O[k+1], …, O[n] | g[k] = v)

We then obtain Pr(g[k] | O[1], …, O[n] = exp(a[k][v] + b[k][v]) / s where s = sum_v exp(a[k][v] + b[k][v])

Value

A list of three-dimensional arrays of probabilities, individuals x positions x genotypes

Examples

1
2
grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2"))
probs <- calc_genoprob(grav2, step=1, error_prob=0.002)

simecek/qtl2 documentation built on May 29, 2019, 10:01 p.m.