Learn R Programming

hsphase (version 2.0.4)

ohd: Opposing Homozygote Detection

Description

Counts the number of opposing homozygotes for each animal that caused a heterozygus site in the sire.

Usage

ohd(genotypeMatrix, unique_check = FALSE, SNPs = 6000)

Value

Returns a vector with the number of heterozygous sites that each sample caused.

Arguments

genotypeMatrix

matrix half-sib genotypes (one half-sib per row, with SNP ordered by mapping position in the columns. Data should be numeric. Use 0, 1 and 2 respectively for AA, AB and BB. Use 9 for missing data)

unique_check

logical check if samples uniquely originate an opposing homozygote at a locus

SNPs

integer number of SNP to use

Author

This method is suggested by Bruce Tier <btier@une.edu.au> to identify pedigree errors.

Examples

Run this code
genotype <- matrix(c(        
  2,1,0,                  
  2,0,0,                  
  0,0,2                   
  ), byrow = TRUE, ncol = 3)    
  
ohd(genotype)             

Run the code above in your browser using DataLab