impute: Impute missing recombination fraction estimates

Description Usage Arguments Details Value

View source: R/impute.R

Description

Impute missing recombination fraction estimates

Usage

1
2
3
4
5
6
impute(
  mpcrossLG,
  verbose = FALSE,
  allErrors = FALSE,
  extractErrorsFunction = function(e) e
)

Arguments

mpcrossLG

An object of class mpcrossLG, which contains estimated pairwise recombination fractions

verbose

Should more verbose output be generated?

allErrors

If there is an error, should we immediately return, or should we continue, and report all errors?

extractErrorsFunction

Error handling function. If there are errors and allErrors is TRUE, this function will be called with a matrix indicating which estimates could not be imputed.

Details

Recombination fractions between every pair of markers are estimated using numerical maximum likelihood. Unfortunately the likelihood is flat in some cases, so an estimate cannot be made. This later causes problems when trying to use estimated recombination fractions to order the markers, because a complete matrix of estimates is required. The solution is to impute the missing estimates using related estimates. For example, the recombination fraction between markers A and C may not be directly estimatable. However, there may be a marker B known to be tightly linked to A, which has a known recombination fraction with C. The estimated recombination fraction between B and C can be taken to be an estimate of the recombination fraction between A and C.

This function imputes values in the estimated recombination fraction matrix, to return a complete matrix. If there is a value that cannot be imputed, an error is triggered. Input allErrors controls whether the function will stop after encountering a single error, or continue and report all errors. If all errors are being reported, the optional function extractErrorsFunction is called with information about which missing estimates could not be imputed.

Value

An object of class mpcrossLG, containing all the information in the input object, but also an imputed copy of the estimated recombination fraction data.


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