switchDetector: Switch Detector

View source: R/switchDetector.R

switchDetectorR Documentation

Switch Detector

Description

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

Usage

switchDetector(groupMatrix)

Arguments

groupMatrix

matrix. Group matrix generated by groupMatSingle.

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.

See Also

groupMatSingle

Examples

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)

hsphase documentation built on Feb. 17, 2026, 5:07 p.m.