rpoh: Reconstruct Pedigree Based on Matrix of Opposing Homozygotes

View source: R/rpoh.R

rpohR Documentation

Reconstruct Pedigree Based on Matrix of Opposing Homozygotes

Description

Reconstructs a half-sib pedigree based on a matrix of opposing homozygotes.

Usage

rpoh(genotypeMatrix, oh, forwardVectorSize = 30, excludeFP = TRUE, nsap = 3,
maxRec = 15, intercept = 26.3415, coefficient = 77.3171, snpnooh, method, maxsnpnooh)

Arguments

genotypeMatrix

matrix genotype of one chromosome (data should be numeric. Use 0, 1 and 2 for respectively AA, AB and BB. Use 9 for missing data)

oh

integer Opposing homozygotes matrix (Output of ohg)

forwardVectorSize

integer number of heterozygous sites used to validate recombination events or check for genotyping errors

excludeFP

logical excludes SNPs that may cause heterozygous sites in the sire due to genotyping errors or map errors

nsap

integer number of SNP per block to validate recombinations

maxRec

integer maximum number of expected recombinations per individual

intercept

integer intercept of fitted model

coefficient

integer coefficient of fitted model

snpnooh

integer number of SNPs used to create oh matrix (this number must be divided by 1000)

method

character pedigree reconstruction method

maxsnpnooh

numeric the maximum number of allowing opposing homozygote in a half-sib family

Details

Four methods simple, recombinations, calus and manual can be utilized to reconstruct the pedigree.

The following examples show the arguments require for each method.

pedigree1 <- rpoh(oh = oh, snpnooh = 732, method = "simple")
pedigree2 <- rpoh(genotypeMatrix = genotypeChr1, oh = ohg(genotype), maxRec = 10 , method = "recombinations")
pedigree3 <- rpoh(genotypeMatrix = genotype, oh = oh, method = "calus")
pedigree4 <- rpoh(oh = oh, maxsnpnooh = 31662, method = "manual")

Value

Returns a data frame with two columns, the first column is animals' ID and the second column is sire identifiers (randomly generated).

Note

Method can be recombinations, simple, calus or manual. Please refer to vignette for more information.

The sire genotype should be removed before using this function utilizing pogc function.

See Also

bmh and recombinations

Examples

# Please run demo(hsphase)

hsphase documentation built on May 29, 2024, 2:20 a.m.