makehap: Make list of imputed sire haplotypes

View source: R/functions.R

makehapR Documentation

Make list of imputed sire haplotypes

Description

List of sire haplotypes is set up in the format required for hsrecombi. Sire haplotypes are imputed from progeny genotypes using R package hsphase.

Usage

makehap(sireID, daughterSire, genotype.chr, nmin = 30, exclude = NULL)

Arguments

sireID

vector (LEN N) of IDs of all sires

daughterSire

vector (LEN n) of sire ID for each progeny

genotype.chr

matrix (DIM n x p) of progeny genotypes (0, 1, 2) on a single chromosome with p SNPs; 9 indicates missing genotype

nmin

scalar, minimum required number of progeny for proper imputation, default 30

exclude

vector (LEN < p) of SNP indices to be excluded from analysis

Value

list (LEN 2) of lists. For each sire:

famID

list (LEN N) of vectors (LEN n.progeny) of progeny indices relating to lines in genotype matrix

sireHap

list (LEN N) of matrices (DIM 2 x p) of sire haplotypes (0, 1) on investigated chromosome

References

Ferdosi, M., Kinghorn, B., van der Werf, J., Lee, S. & Gondro, C. (2014) hsphase: an R package for pedigree reconstruction, detection of recombination events, phasing and imputation of half-sib family groups BMC Bioinformatics 15:172. https://CRAN.R-project.org/package=hsphase

Examples

 data(targetregion)
 hap <- makehap(unique(daughterSire), daughterSire, genotype.chr)

hsrecombi documentation built on June 7, 2023, 6:02 p.m.