hbp: Haplotype Blocks of Phased Data

Description Usage Arguments Value Note See Also Examples

Description

Creates a blocking structure matrix of the half-sib family based on phased data of the sire and half-sib family.

Usage

1
hbp(PhasedGenotypeMatrix, PhasedSireGenotype, strand = "auto")

Arguments

PhasedGenotypeMatrix

matrix haplotypes for a half-sib family (two rows per individual)

PhasedSireGenotype

matrix haplotypes of sire

strand

character method for identification of paternal strand (1 and 2 for strand one and two of the offsprings)

Value

Returns a matrix where 3 or 4 stands for the SNP originating in, respectively, strands 1 and 2. 0 indicates that the source strand for the SNP is unknown.

Note

The input matrices must only contain individuals from one half-sib family and one ordered chromosome. The strand option should be set to "auto" (default value).

See Also

aio, ssp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
sire <- matrix(c(
  0,0,0,0,0,1,                  # Haplotype one of the sire
  0,1,1,1,1,0                   # Haplotype two of the sire
  ), byrow = TRUE, ncol = 6)
  
haplotypeHalfsib <- matrix(c(
  1,0,1,1,1,1,                  # Individual one, haplotype one
  0,1,0,0,0,0,                  # Individual one, haplotype two
  0,1,1,0,1,1,                  # Individual two, haplotype one
  1,0,0,1,0,0                   # Individual two, haplotype two
  ), byrow = TRUE, ncol = 6)    # 0s and 1s are alelle a and b
  
 hbp(haplotypeHalfsib, sire)

hsphase documentation built on May 2, 2019, 3:44 p.m.