ibd.marker: Score IBD sharing at a list of marker positions.

Description Usage Arguments Details Value Examples

Description

ibd.marker determines pairwise IBD sharing at marker positions.

Usage

1
2
ibd.marker(inheritance, marker, ind1index, ind2index = NULL,
  relatedness = TRUE)

Arguments

inheritance

list of numeric matrices.

marker

numeric vector.

ind1index, ind2index

positive integer, represents index of individual in pedigree.

relatedness

logical, determines coding of IBD information.

Details

When only index of one individual is supplied, IBD sharing status at each marker is coded as 0 (not IBD) or 1 (IBD) between the two haplotypes of the individual.

When indices of two individuals are supplied, IBD sharing status at each marker is either in relatedness (default) or lexicographical order of IBD state, where recoding can be done using recode.ibd.

Value

A numeric vector of IBD sharing status at the list of marker positions.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# 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)
nsnp = 10
marker = sort(runif(nsnp, 0, 100))

# IBD at markers between the two haplotypes of the inbred individual
ibd.marker(inheritance, marker, 5)

# IBD at markers between the two full sibs, with different IBD coding
ibd.marker(inheritance, marker, 3, 4) # relatedness
ibd.marker(inheritance, marker, 3, 4, relatedness = FALSE) # lexicographical order of IBD state

bowenwang7/r3 documentation built on May 17, 2019, 6:39 p.m.