# NOT RUN {
plotWOptions <- function(graph)
plot(graph, vertex.size = 8, vertex.label.cex=0.6, edge.arrow.size=0.01, edge.width=0.2)
#F2 design
pedigree <- twoParentPedigree(initialPopulationSize = 10, selfingGenerations = 1,
intercrossingGenerations = 0, nSeeds = 1)
graph <- pedigreeToGraph(pedigree)
plotWOptions(graph)
#An equivalent F2 design (if the founders really are inbred)
pedigree <- twoParentPedigree(initialPopulationSize = 10, selfingGenerations = 0,
intercrossingGenerations = 1, nSeeds = 0)
graph <- pedigreeToGraph(pedigree)
plotWOptions(graph)
#Another equivalent F2 design (if the founders really are inbred)
pedigree <- twoParentPedigree(initialPopulationSize = 1, selfingGenerations = 1,
intercrossingGenerations = 0, nSeeds=10)
graph <- pedigreeToGraph(pedigree)
plotWOptions(graph)
#A RIL design (10 generations of inbreeding)
pedigree <- twoParentPedigree(initialPopulationSize = 10, selfingGenerations = 10,
intercrossingGenerations = 0, nSeeds = 1)
graph <- pedigreeToGraph(pedigree)
plotWOptions(graph)
#Another RIL design (10 generations of inbreeding)
pedigree <- twoParentPedigree(initialPopulationSize = 1, selfingGenerations = 10,
intercrossingGenerations = 0, nSeeds = 10)
graph <- pedigreeToGraph(pedigree)
plotWOptions(graph)
#One generation of mixing followed by 10 generations of inbreeding
pedigree <- twoParentPedigree(initialPopulationSize = 10, selfingGenerations = 10,
intercrossingGenerations = 1, nSeeds = 1)
graph <- pedigreeToGraph(pedigree)
plotWOptions(graph)
#Two generations of mixing and no inbreeding
pedigree <- twoParentPedigree(initialPopulationSize = 10, selfingGenerations = 0,
intercrossingGenerations = 2, nSeeds = 0)
graph <- pedigreeToGraph(pedigree)
plotWOptions(graph)
#One generation of mixing, and then two selfed lines are generated (10 generations of selfing)
pedigree <- twoParentPedigree(initialPopulationSize = 10, selfingGenerations = 10,
intercrossingGenerations = 1, nSeeds = 2)
graph <- pedigreeToGraph(pedigree)
plotWOptions(graph)
# }
Run the code above in your browser using DataLab