SamplePedigree {HaploSim} | R Documentation |
Simulate a haplotypes in a pedigree
Description
Simulates haplotypes within a given pedigree. Haplotypes for a base
individual are sampled from a list of base haplotypes. Parameters for
sampling haplotypes are passed to function SampleHaplotype
.
Usage
SamplePedigree(orig,ped,...)
Arguments
orig |
List of objects of class |
ped |
|
... |
Arguments to be passed to function |
Details
Samples haplotypes for individuals in a pedigree and returns a
pedigree with two additional columns which identify the two haplotypes
of an individual together with a list of haplotypes. Uses function
SampleHaplotype
to sample a meiosis event between two parental
haplotypes.
Value
A list with a pedigree and a list of objects of class
haplotype
.
See Also
Examples
example(SampleHaplotypes)
ID <- 1:10
pID0 <- c(rep(0,5),1,1,3,3,5)
pID1 <- c(rep(0,4),2,2,2,4,4,6)
ped <- data.frame(ID,pID0,pID1)
phList <- SamplePedigree(orig = hList,ped = ped)