View source: R/makeHaplotypes.R
buildhPedigree | 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 |
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
.
SampleHaplotypes
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) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.