haploMatch: Match haplotype

haploMatchR Documentation

Match haplotype

Description

For a set of given haplotypes finds best matching haplotypes from a canditate list with loss function being the number of non equal elements.

Usage

haploMatch(haploStrA, haploStrB)

Arguments

haploStrA

Matrix with given haplotype structure. nrow(haploStrA) is number of SNP locations and ncol(haploStrA) is number of estimated haploypes.

haploStrB

Matrix of a candidate list of haplotypes. nrow(haploStrB) is number of SNP locations and ncol(haploStrB) is number of candidate haploypes.

Value

Integer vector with indexes of haploStrB which fit haploStrA best.

Examples

 Compare the reconstruction with 3 dominant haplotypes to the one with 7 dominant haplotypes
 data(ExampleDataset)
 reconstruction1 <- haploSep(data = Y, nHaplo = 3, stabEval = FALSE, bias = TRUE)
 reconstruction2 <- haploSep(data = Y, nHaplo = 7, stabEval = FALSE, bias = TRUE)
 haploMatch(reconstruction1$haploStr, reconstruction2$haploStr)
 
 

MartaPelizzola/haploSep documentation built on May 26, 2023, 11:36 a.m.