Specify an equally spaced grid of genetic positions
generateGridPositions(spacing)
The spacing of the genetic positions, in cM.
A function which can be applied to an object of class mpcrossMapped
by imputeFounders
or computeGenotypeProbabilities
.
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 an equally spaced grid of positions.
Note that the return value is itself a function, which is applied internally by imputeFounders
or computeGenotypeProbabilities
to an object of class mpcrossMapped
.
# 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 = generateGridPositions(1))
# }
Run the code above in your browser using DataLab