ped <- data.frame(
id = c("F1", "F2", "S1", "S2"),
sire = c(NA, NA, "F1", "F1"),
dam = c(NA, NA, "F2", "F2"),
sex = c("M", "F", "F", "F"),
stringsAsFactors = FALSE
)
genotype <- data.frame(
id = c("S1", "S2"),
haplotype1 = c("A001_B001", "A001_B001"),
haplotype2 = c("A002_B012", "A008_B015b"),
stringsAsFactors = FALSE
)
carriers <- mhcHaplotypeCarriers(genotype, rareOnly = FALSE)
obfuscated <- obfuscatePed(ped, map = TRUE)
obfuscateMhcHaplotypes(carriers, obfuscated$map)
Run the code above in your browser using DataLab