buildhPedigree {HaploSim}R Documentation

Build a haplotype pedrigree from a haplotype list

Description

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.

Usage

buildhPedigree(hPedigree = NULL,hList)

Arguments

hPedigree

If unspecified, the previous haplotype pedigree upon which buildhPed builds the additional haplotypes.

hList

A list with objects of class haplotype.

Details

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.

Value

A data.frame.

See Also

SampleHaplotypes

Examples

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)
  }

[Package HaploSim version 1.8.4.2 Index]