DipPedigreeSim: Simulate Diploid Pedigree

View source: R/PopSims.R

DipPedigreeSimR Documentation

Simulate Diploid Pedigree

Description

Simulate a diploid population pedigree and calculate kinships from a few subpopulations

Usage

DipPedigreeSim(ancestrygenomatrix, pedigree, ancestry = NA, ancestryprop = NA)

Arguments

ancestrygenomatrix

A matrix of allele frequencies in ancestral subpopulations.

pedigree

A data frame describing the simulation of a pedigree. See pedigree.

ancestry

A matrix including dirichlet params for the admixture of ancestral subpopulations. Rows denote ancestral subpopulations. Columns denote different admixture schemes.

ancestryprop

A vector with the length of number of column of ancestry denoting the probability of drawing individuals from each admixed populations. Average sampling if none give.

Value

Kinships of PairsOfInterest from simulated populations.

See Also

PopulationSim(), kinship()

Examples

ancestrygenomatrix<-PopulationSim(1000,c(0.05,0.15,0.25))
ancestry<-matrix(c(6,2,0.3,2,6,0.3),nrow=3)
DipPedigreeSim(ancestrygenomatrix,pedigree,ancestry)

YenWenWang/HapDipKinship documentation built on Jan. 20, 2025, 10:09 a.m.