Learn R Programming

hsphase (version 1.2.4)

ohg: Matrix of Opposing Homozygotes

Description

Creates a matrix of opposing homozygotes from the genotype matrix.

Usage

ohg(genotypeMatrix, cpus = 2)

Arguments

genotypeMatrix
{Matrix genotype (Data should be numeric. Use 0, 1 and 2 respectively for AA, AB and BB. Use 9 for missing data) }
cpus
{integer set the number of CPUs }

Value

  • Returns a square matrix (sample X sample) with the pairwise counts of opposing homozygotes.

See Also

rpoh

Examples

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

Run the code above in your browser using DataLab