buildhPedigree {HaploSim} | R Documentation |
Builds a haplotype pedigree from a list of objects of class
haplotype
. Objects have attributes hID
and phID0
,
phID1
, the last two refer to the two haplotypes in the
parent. Function can construct a new pedigree or continue a given pedigree.
Simulate a list of haplotypes, either sampling using population
parameters or from a previous list of haplotypes through a series of
meioses.
buildhPedigree(hPedigree = NULL,hList)
hPedigree |
If unspecified, the previous haplotype pedigree upon which buildhPed builds the additional haplotypes. |
hList |
A list with objects of class haplotype . |
The function buildhPedigree
uses the attributes hID
,
phID0
, phID1
of objects of class haplotype to
build a pedigree of haplotypes. Each haplotype originates
from a pair of parental haplotypes between which the meiosis event
occured or has no known parental haplotypes.
A data.frame
.
example(SampleHaplotypes) hPedigree <- buildhPedigree(hList = hList) for(g in 1:10) { hList <- SampleHaplotypes(orig = hList,genDist = 1,roundDec = 3) hPedigree <- buildhPedigree(hPedigree=hPedigree,hList = hList) }