ehhR: A function to calculate EHH (Extended Haplotype Homozygosity)...

Description Usage Arguments Value Author(s) Examples

View source: R/ehhR.R

Description

A function to calculate EHH (Extended Haplotype Homozygosity) given a focal SNPs and a haplotype matrix.

Usage

1
ehhR(hapmatrix, site)

Arguments

hapmatrix

A haplotype matrix with ones (ancestral) and twos (derived).

site

A specific site.

Value

EHH (Extended Haplotype Homozygosity).

Author(s)

Fei Xiang (xf3087@gmail.com)

Examples

1
2
3
exmtx=matrix(sample(2,80,replace=T),ncol=10,nrow=8)
ehhR(exmtx,2)
ehhR(exmtx,4)

sdwfrost/popseq documentation built on May 29, 2019, 4:23 p.m.