Learn R Programming

hsphase (version 1.2.4)

co: Crossover Detection

Description

Detect all possible crossover events.

Usage

co(genotypeMatrix)

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 for respectively AA, AB and BB. Use 9 for missing data) }

Value

  • Returns a matrix with the number of crossover events for each site.

Examples

Run this code
genotype=matrix(c(          # Define a Half-sib Genotype Matrix
  2,1,0,                    # Individual 1
  2,0,2,                    # Individual 2
  0,0,2                     # Individual 3
  ), byrow=TRUE, ncol=3)    # There are 3 individuals with three SNPs
  
co(genotype)

Run the code above in your browser using DataLab