Learn R Programming

mpMap2 (version 1.0.4)

probabilityData: Get IBD probability data

Description

Get the identity-by-descent probability data from an mpcross object.

Usage

probabilityData(object, ...)

# S4 method for geneticData probabilityData(object, ...)

# S4 method for mpcrossMapped probabilityData(object, ...)

Arguments

object

The mpcross object from which to extract the probability data.

...

Additional options. Only design is supported, and gets the probability data for only a single experiment.

Value

A numeric matrix containing the IBD probabliity data, or a list of such matrices in the case of multiple experiments within a single object.

Details

mpMap2 stores IBD probabilities in a matrix where the number of rows is the number of alleles times the number of genetic lines, and the columns are the positions at which probabilities are calculated. In the example below, the row names are L115 - L1, L115 - L2, L115 - L3, L115 - L4, L120 - L1, etc, and the column names are DXM1, DXM2, DXM3, etc. So, for example, for a population generated from four founders and assumed to be totally inbred, the first four values in the first column are the probabilities that genetic line 1 carries alleles from specific founders, at a specific position. The first four columns give the probabilities for genetic line 2 at the next position, etc.

This can be an inconvenient layout for some operations. This function returns a matrix where the alleles appear as part of the columns, rather than the rows. For example, after applying this function to the given example, the first four values in the first row will be the probabilities that genetic line 1 carries alleles from specific founders, at a specific position.

Examples

Run this code
# NOT RUN {
data(simulatedFourParentData)
crossSNP <- simulatedFourParentData + multiparentSNP(keepHets = FALSE)
mapped <- mpcrossMapped(crossSNP, map = simulatedFourParentMap)
probabilities <- computeGenotypeProbabilities(mapped, error = 0.05)
probabilityData <- probabilityData(probabilities)
probabilityData[1:5, 1:5]
# }

Run the code above in your browser using DataLab