Description Usage Arguments Details Value Examples
ibd.length
returns the total length of IBD segemnt between two haplotypes.
1 | ibd.length(inher.hap1, inher.hap2, startpos = NULL, endpos = NULL)
|
inher.hap1, inher.hap2 |
numeric matrix. |
startpos, endpos |
non-negative number. |
This function works with output from sim.recomb
.
A non-negative number representing the length of IBD segment in Haldane centiMorgan.
1 2 3 4 5 6 7 8 9 10 11 | # a simple pedigree with sibling marriage
pedigree = as.character(rep(1, 5))
member = as.character(c(11, 12, 21, 22, 31))
sex = as.numeric(c(1, 2, 1, 2, 1))
father = as.character(c(NA, NA, 11, 11, 21))
mother = as.character(c(NA, NA, 12, 12, 22))
pedinfo = data.frame(pedigree, member, sex, father, mother, stringsAsFactors = FALSE)
inheritance = sim.recomb(pedinfo, 100)
# IBD length between the two haplotypes of inbred individual 31
ibd.length(inheritance[[9]], inheritance[[10]])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.