Learn R Programming

hsphase (version 3.0.0)

aio: All-in-one Phasing

Description

Phasing of a single half-sib family group (single ordered chromosome).

Usage

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

Value

If output = "phase", returns a haplotype matrix with two rows per individual (first paternal, second maternal), coded as 0 (allele A), 1 (allele B), and 9 (missing/unphased).

Otherwise returns a list with elements:

  • phasedHalfsibs

  • sireHaplotype

  • blockStructure

Arguments

genotypeMatrix

matrix. Half-sib genotypes (one half-sib per row, SNPs ordered by map position in columns). Data must be numeric: 0, 1, 2 for AA, AB, BB. Use 9 for missing.

bmh_forwardVectorSize

integer. Number of heterozygous sites used to validate recombination events or detect genotyping/map errors.

bmh_excludeFP

logical. Exclude SNPs that may induce false heterozygous sites in the sire due to genotyping or map errors.

bmh_nsap

integer. Number of SNP per block to validate recombinations (e.g. 50K \(\to\) 3, 700K \(\to\) 10).

bmh_fillMissing

logical. If TRUE, recombination points are placed at the mid-point of the ambiguous interval rather than marking surrounding SNPs as missing.

output

character. If "phase", the function returns only the phased haplotypes matrix.

Details

This function calls bmh, ssp, and phf.

See Also

bmh, ssp, 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