Learn R Programming

hsphase (version 1.2.4)

aio: All-in-one Phasing

Description

Phasing of a half-sib family group.

Usage

aio(genotypeMatrix, bmh_forwardVectorSize = 30, bmh_excludeFP = TRUE,
bmh_nsap = 3, output = "phase")

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) }
bmh_forwardVectorSize
Integer number of heterozygous sites used to validate recombination events or check for genotyping errors
bmh_excludeFP
logical excludes SNPs that may cause heterozygous sites in the sire due to genotyping errors or map errors
bmh_nsap
Integer number of SNP per block to validate recombinations
output
character if equal to phase the 'aio' will only return the phasing results

Value

  • Returns a list of matrices. The first element (phasedHalfsibs) is a matrix with two rows (phased haplotypes) per individual (first paternal and second maternal). Data in format 0 (A), 1 (B) and 9 (unphased or missing). The second (sireHaplotype) and third (blockStructure) elements are the same as the output of ssp and bmh.

Details

This function calls the bmh, ssp and phf functions.

See Also

bmh, ssp and phf

Examples

Run this code
genotype=matrix(c(          # Define a Half-sib Genotype Matrix
  2,1,0,                    # Individual 1
  2,0,0,                    # Individual 2
  0,0,2                     # Individual 3
  ), byrow=TRUE, ncol=3)    # There are 3 individulas with three SNPs
  
aio(genotype)               # The genotypes must include only one half-sib family and one chromosome

Run the code above in your browser using DataLab