Learn R Programming

mpMap2 (version 1.0.4)

imputationKey: Get out key for IBD genotype imputations

Description

Get out key for IBD genotype imputations

Usage

imputationKey(object, ...)

# S4 method for imputed imputationKey(object, ...)

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

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

Arguments

object

The object from which to get the imputation key.

...

Extra parameters. Currently only "experiment" is supported, letting the user extract the imputation map for a specific experiment.

Value

Key giving the encoding of heterozygotes, in the imputed IBD genotype data.

Details

When IBD genotype imputation is performed using a population with finite generations of selfing, some of the imputed genotypes will be heterozygotes. However, the imputation code only returns a single value per line per genetic position. This key translates that value to a pair of founder alleles.

The key is a matrix with three columns. The first two columns represent founder alleles, and the third column gives the encoding for that particular pair of founder alleles.

Examples

Run this code
# NOT RUN {
pedigree <- eightParentPedigreeRandomFunnels(initialPopulationSize = 100, 
	selfingGenerations = 2, nSeeds = 1, intercrossingGenerations = 0)
selfing(pedigree) <- "finite"
#Generate map
map <- qtl::sim.map()
#Simulate data
cross <- simulateMPCross(map = map, pedigree = pedigree, mapFunction = haldane)
crossSNP <- cross + multiparentSNP(keepHets = TRUE)
crossMapped <- mpcrossMapped(crossSNP, map = map)
imputed <- imputeFounders(crossMapped, errorProb = 0.01)
#An imputed IBD genotype of 1 indicates a homozygote for founder 1
#An imputed IBD genotype of 9 indicates a heterozygote for founders 1 and 2
#etc
head(imputationKey(imputed))
# }

Run the code above in your browser using DataLab