hapdipking: Haploid-diploid kinship estimation

View source: R/HapDipKinship.R

hapdipkingR Documentation

Haploid-diploid kinship estimation

Description

Estimate kinship between a haploid and a diploid individuals.

Usage

hapdipking(dip, hap, dipref = NA)

Arguments

dip

A vector encoding the genotype of a diploid individual (0,1,2).

hap

A vector encoding the genotype of a haploid individual (0,1).

dipref

A vector encoding the genotype of the reference diploid individual (0,1,2). Perform exKING-robust hap-dip kinship estimation if none provided.

Examples

##Calculate kinship of a pair of full siblings
dip<-rbinom(1000,2,0.5)
hap<-rbinom(1000,1,0.5)
### without reference(exKING-robust)
hapdipking(anastomosis(meiosis(dip),hap),meiosis(dip))
### with reference(KIMGENS)
hapdipking(anastomosis(meiosis(dip),hap),meiosis(dip),dipref=dip)

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