# NOT RUN {
data(simulatedFourParentData)
part1 <- subset(simulatedFourParentData, lines =
names(which(finals(simulatedFourParentData)[, 50] == 1)))
part2 <- subset(simulatedFourParentData, lines =
names(which(finals(simulatedFourParentData)[, 50] != 1)))
distorted <- subset(part1, lines = sample(nLines(part1), 100)) + part2
distortedMapped <- mpcrossMapped(distorted, map = simulatedFourParentMap)
probabilities <- computeGenotypeProbabilities(distortedMapped)
#Here the composition of the population reflects the fact that we have less of founder 1 than
# expected, at a specific point on the genome
plotProbabilities(probabilities)
#Go back to the undistorted data
undistortedMapped <- mpcrossMapped(simulatedFourParentData, map = simulatedFourParentMap)
probabilities <- computeGenotypeProbabilities(distortedMapped)
#Here the composition of the population reflects the expected inheritance; the trace
# corresponding to every founder is flat
plotProbabilities(probabilities)
# }
Run the code above in your browser using DataLab