Learn R Programming

hsphase (version 1.2.3)

bmh: Block Partitioning

Description

Identifies the block structure (chromosome segments) in the half-sib family that each individual inherited from its sire.

Usage

bmh(GenotypeMatrix, forwardVectorSize = 30, excludeFP = TRUE, nsap = 3)

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).
forwardVectorSize
Integer number of heterozygous sites used to validate recombination events or check for genotyping errors
excludeFP
logical excludes SNPs that may cause heterozygous sites in the sire due to genotyping errors or map errors
nsap
Integer number of SNP per block to validate recombinations

Value

  • Returns a matrix of the blocking structure that contains 1s, 2s and 0s. 1s and 2s are the two sire strands. The choice of strand is arbitrary for each chromosome and not consistent across chromosomes. 0s indicate regions of unknown origin.

See Also

ssp, phf, aio and imageplot

Examples

Run this code
genotype <- matrix(c(
0,2,1,1,1,
2,0,1,2,2,
2,2,1,0,2,
2,2,1,1,1,
0,0,2,1,0), ncol=5, byrow=TRUE) 

(result <- bmh(genotype))

Run the code above in your browser using DataLab