Learn R Programming

selfingTree (version 0.2)

evalProb: Evaluates the genotype probability

Description

This function symbolically sums the marginal probabilities of relevant nodes and evaluates them with user specified values for the recombination frequencies.

Usage

evalProb(node.prob, x = 0, y = 0, z = 0, chunk.size = min(length(node.prob),75))

Arguments

node.prob
Character vector with symbolic marginal node probabilities, i.e., a (subset of) an element of the list returned by function nodeProbabilities.
x,y,z
Recombination frequencies. For three-marker genotypes, x is the recombination frequency between markers 1 and 2 and y that between markers 2 and 3. For two-marker genotypes, z is recombination frequency between
chunk.size
node.prob is split into several parts of size equal to chunk.size and summation done within each chunk first and then across chunks.

Value

  • The genotype probability (numeric).

Examples

Run this code
evalProb(extractProbs(genSubtree.3M("BAA","AAB")),x = 0.123,y = 0.344)

Run the code above in your browser using DataLab