estimateRF: Estimate pairwise recombination fractions This function...

Description Usage Arguments Details Value Examples

View source: R/estimateRF.R

Description

Estimate pairwise recombination fractions

This function estimates the recombination fractions between all pairs of markers in the input object. The recombination fractions are estimated using numerical maximum likelihood, and a grid search. Because every estimate will be one of the input test values, the estimates can be stored efficiently with a single byte per estimate.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
estimateRF(
  object,
  recombValues,
  lineWeights,
  gbLimit = -1,
  keepLod = FALSE,
  keepLkhd = FALSE,
  verbose = FALSE,
  markerRows = 1:nMarkers(object),
  markerColumns = 1:nMarkers(object)
)

Arguments

object

An object of class mpcross.

recombValues

a vector of test values to use for the numeric maximum likelihood step. Must contain 0 and 0.5, and must have less than 255 values in total. The default value is c(0:20/200, 11:50/100).

lineWeights

Values to use to correct for segregation distortion. This parameter should in general be left unspecified.

gbLimit

The maximum amount of working memory this estimation step should be allowed to use at any one time, in gigabytes. Smaller values may increase the computation time. A value of -1 indicates no limit.

keepLod

Set to TRUE to compute the likelihood ratio score statistics for testing whether the estimate is different from 0.5. Due to memory constraints this should generally be left as FALSE.

keepLkhd

Set to TRUE to compute the maximum value of the likelihood. Due to memory constraints this should generally be left as FALSE.

verbose

Output diagnostic information, such as the amount of memory required, and the progress of the computation.

markerRows

Used to estimate only a subset of the full matrix of pairwise recombination fractions.

markerColumns

Used to estimate only a subset of the full matrix of pairwise recombination fractions.

Details

The majority of the options for this function should not be specified by the end user. In particular, keepLkhd, keepLod and lineWeights should not be specified without good reason.

Arguments markerRows and markerColumns can be used to estimate only a subset of the full recombination matrix. Reasons for doing this could include

  1. Allowing the full matrix to be estimated in multiple steps, with intermediate computations being saved

  2. The matrix of recombination fractions has mostly already been estimated. This can occur when adding extra markers.

  3. Memory limitations. Performing estimation for markers with many alleles takes a large amount of memory. It is often useful to estimate recombination fractions between all pairs of biallelic markers, and let other pairs be done using a separate call.

If arguments markerRows and markerColumns are used, only the upper-triangular part of the specified subset is computed. See the examples for details.

Value

An object of class mpcrossRF, which contains the original genetic data, and also estimated recombination fraction data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
map <- qtl::sim.map(len = 100, n.mar = 11, include.x=FALSE)
f2Pedigree <- f2Pedigree(1000)
cross <- simulateMPCross(map = map, pedigree = f2Pedigree, mapFunction = haldane, seed = 1)
rf <- estimateRF(cross)
#Print the estimated recombination fraction values
rf@rf@theta[1:11, 1:11]

#Now only estimate recombination fractions between the first 3 markers. 
#    The other estimates will just be marked as NA
rf <- estimateRF(cross, markerRows = 1:3, markerColumns = 1:3)
#Print the estimated recombination fraction values
rf@rf@theta[1:11, 1:11]

#A more complicated example, where three values are estimated
rf <- estimateRF(cross, markerRows = 1, markerColumns = 1:3)
#Print the estimated recombination fraction values
rf@rf@theta[1:11, 1:11]

#In this case only ONE value is estimated, because only one element of the requested subset 
#    lies in the upper-triangular part - The value on the diagonal. 
rf <- estimateRF(cross, markerRows = 3, markerColumns = 1:3)
#Print the estimated recombination fraction values
rf@rf@theta[1:11, 1:11]

rohan-shah/mpMap2 documentation built on July 21, 2020, 8:58 p.m.