transposeProbabilities: Transpose IBD probabilities

Description Usage Arguments Details Value Examples

View source: R/transposeProbabilities.R

Description

Transpose the IBD probabilities matrix, so that the different alleles or founders appear on the columns, rather than the rows

Usage

1

Arguments

inputObject

The mpcross object containing the probability data.

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.

Value

A numeric matrix containing IBD probability data.

Examples

1
2
3
4
5
6
7
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]
transposeProbabilities(probabilities)[1:5,1:5]

mpMap2 documentation built on Sept. 13, 2020, 5:17 p.m.