Learn R Programming

hsphase (version 1.2.3)

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)

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 }

Value

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

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