recode.ibd: Recode IBD sharing.

Description Usage Arguments Details Value Examples

Description

recode.ibd recodes pairwise IBD sharing information.

Usage

1
recode.ibd(ibdvec, from, to)

Arguments

ibdvec

numeric vector of input IBD sharing information.

from, to

string, IBD sharing information options include "ibdstate", "lexi", "jac", "jac.red" and "relatedness".

Details

At any marker, there are 15 possible IBD states between the four genes of two individuals. "ibdstate" represents the standard coding of the 15 states from 1111 to 1234. "lexi" and "jac" represent lexicographical and Jacquard ordering of "ibdstate" from 1 to 15 respectively. "jac.red" is a condensed Jacquard ordering from 1 to 9 for the genotypically distinct groups of IBD states when phasing is unknown. "relatedness" refers to local relatedness coefficient taking values in (0, 0.5, 1, 2).

"ibdstate", "lexi" and "jac" are of the highest level (complete information), "jac.red" is of mid level, whereas "relatedness" is of the lowest level. Conversion cannot go from lower level to higher level.

Value

A numeric vector of recoded IBD states.

Examples

1
2
3
4
5
test.state = c(1111, 1122, 1212, 1222, 1234)
recode.ibd(test.state, "ibdstate", "lexi")
recode.ibd(test.state, "ibdstate", "jac")
recode.ibd(test.state, "ibdstate", "jac.red")
recode.ibd(test.state, "ibdstate", "relatedness")

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