Learn R Programming

mpMap2 (version 1.0.4)

generateIntervalMidPoints: Specify interval midpoints

Description

Specify interval midpoints

Usage

generateIntervalMidPoints(object)

Arguments

object

The object of class mpcrossMapped from which to take the interval midpoints.

Value

A function which can be applied to an object of class mpcrossMapped by imputeFounders or computeGenotypeProbabilities.

Details

Some functions, such as imputeFounders and computeGenotypeProbabilities, take in a set of genetic positions as one of the inputs. This function is an easy way to specify the midpoint of every marker interval.

Note that you don't have to explicitly evaluate this function, it can be passed in directly (see examples).

Examples

Run this code
# NOT RUN {
data(simulatedFourParentData)
#Create object that includes the correct map
mapped <- new("mpcrossMapped", simulatedFourParentData, map = simulatedFourParentMap)
#Estimate IBD genotypes at all the markers, and marker midpoints
imputed <- imputeFounders(mapped, errorProb = 0.02, 
	extraPositions = generateIntervalMidPoints(mapped))
#Alternatively we can explicitly evaluate the function. This is identical to above.
imputed <- imputeFounders(mapped, errorProb = 0.02, 
	extraPositions = generateIntervalMidPoints)
# }

Run the code above in your browser using DataLab