pedigreeCross {AlphaSimR} | R Documentation |
Creates a Pop-class
from a generic
pedigree and a set of founder individuals.
pedigreeCross(founderPop, id, mother, father, maxCycle = 100, DH = NULL, useFemale = TRUE, simParam = NULL)
founderPop |
|
id |
a vector of unique identifiers for individuals in the pedigree. The values of these ids are seperate from the ids in the founderPop. |
mother |
a vector of identifiers for the mothers of individuals in the pedigree. Must match one of the elements in the id vector or they will be treated as unknown. |
father |
a vector of identifiers for the fathers of individuals in the pedigree. Must match one of the elements in the id vector or they will be treated as unknown. |
maxCycle |
the maximum number of loops to make over the pedigree to sort it. |
DH |
an optional vector indicating if an individual should be made a doubled haploid. |
useFemale |
If creating DH lines, should female recombination rates be used. This parameter has no effect if, recombRatio=1. |
simParam |
an object of 'SimParam' class |
#Create founder haplotypes founderPop = quickHaplo(nInd=2, nChr=1, segSites=10) #Set simulation parameters SP = SimParam$new(founderPop) #Create population pop = newPop(founderPop, simParam=SP) #Pedigree for a biparental cross with 7 generations of selfing id = 1:10 mother = c(0,0,1,3:9) father = c(0,0,2,3:9) pop2 = pedigreeCross(pop, id, mother, father, simParam=SP)