twoParentPedigree: Generate a two-parent pedigree which starts from inbred...

Description Usage Arguments Value Examples

View source: R/twoParentPedigree.R

Description

Generate a two-parent pedigree starting from inbred founders

Usage

1
2
3
4
5
6
twoParentPedigree(
  initialPopulationSize,
  selfingGenerations,
  nSeeds = 1L,
  intercrossingGenerations
)

Arguments

initialPopulationSize

The number of F1 lines generated

selfingGenerations

The number of selfing generations at the end of the pedigree

nSeeds

The number of progeny taken from each intercrossing line, or from each F1 if no intercrossing is specified. These lines are then selfed according to selfingGenerations

intercrossingGenerations

The number of generations of random mating performed from the F1 generation. Population size is maintained at that specified by initialPopulationSize

Value

An object of class detailedPedigree representing the experimental design, suitable for simulation using simulateMPCross.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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)

mpMap2 documentation built on Sept. 13, 2020, 5:17 p.m.