haplo.enum {haplo.score}R Documentation

Enumerate all possible pairs of haplotypes that are consistent with a set of un-phased multilocus markers

Description

Given input vectors h1 and h2 (one possible pair of haplotypes), enumerate all possible pairs of haplotypes, and return enumerated pairs in matrices h1 and h2.

Usage

haplo.enum(h1, h2)

Arguments

h1 A haplotype vector of length K (K = number of loci), with values of alleles for each of the loci.
h2 A second haplotype vector.

Details

For a pair of haplotypes, if there are H sites that are heterozygous, then there are 2^(H-1) possible pairs to enumerate. To achieve this, the algorithm moves across the loci that are heterozygous (after the 1st heterozygous locus), flipping alleles at heterozygous locations to enumerate all possible pairs of haplotpes, and appending results as rows of the output matrices h1, and h2.

Value

List with components:

h1 A matrix of enumerated haplotypes. If there are N enumerations, h1 will have dimension N x K.
h2 Similar to h1, a matrix of enumerated haplotypes for the second members of the pairs of haplotypes.

Side Effects

References

See Also

haplo.em

Examples



[Package haplo.score version 1.0.2 Index]