Learn R Programming

hsphase (version 3.0.0)

switchDetector: Switch Detector

Description

Detect switch errors in the haplotypes of a half-sib family.

Usage

switchDetector(groupMatrix)

Value

A list of integer vectors. The list length equals the number of individuals. Each vector contains the locations of detected switch errors for that individual.

Arguments

groupMatrix

matrix. Group matrix generated by groupMatSingle.

See Also

groupMatSingle

Examples

Run this code
haplotype <- .simulateHalfsib(8, 3000, type = "haplotype")$phased
switches <- list(2500,0,0,1200,c(1000,2000),500,2000,0)

haplotype2 <- addSwitch(haplotype, switches, 0)
gMat <- groupMatSingle(haplotype2, 100, 2, "haplotype")

switchDetector(gMat)

Run the code above in your browser using DataLab