getIdentityCoef: Identity Coefficients

Description Usage Arguments Value Examples

Description

Determines the identity coefficients based on a pedigree. Autosome coefficients are calculated using the R package identity while the X chromosome coefficients are implemented by XIBD.

Usage

1
getIdentityCoef(pedigree, number.cores)

Arguments

pedigree

a data frame containing a pedigree with 6 columns

  1. Family ID (type "character", "numeric" or "integer")

  2. Individual ID ("numeric" or "integer")

  3. Paternal ID ("numeric" or "integer")

  4. Maternal ID ("numeric" or "integer")

  5. Gender (1 = male, 2 = female)

  6. Phenotype (1 = unaffected, 2 = affected, 0 = unknown)

The family ID is not actually used in the analysis but is required for completeness of the pedigree; thus all individual IDs must be unique and numeric. The individuals in the pedigree should also be numbered in a way such that every parent precedes his or her children.

number.cores

the number of cores used for parallel execution.

Value

A data frame with columns:

  1. Family 1 ID (type "character")

  2. Individual 1 ID (type "character")

  3. Family 2 ID (type "character")

  4. Individual 2 ID (type "character")

  5. The number of meiosis (type "numeric" or "integer")

  6. Autosome identity coefficient for sharing 0 alleles IBD (type "numeric")

  7. Autosome identity coefficient for sharing 1 allele IBD (type "numeric")

  8. Autosome identity coefficient for sharing 2 alleles IBD (type "numeric")

  9. X chromsome identity coefficient for sharing 0 alleles IBD (type "numeric")

  10. X chromsome identity coefficient for sharing 1 allele IBD (type "numeric")

  11. X chromsome identity coefficient for sharing 2 alleles IBD (type "numeric")

headed fid1, iid1, fid2, iid2, a_i0, a_i1, a_i2, x_i0, x_i1 and x_i2, respectively. Each row describes identity coefficient for a unique pair of samples.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
# generate a pedigree
my_pedigree <- data.frame(fid = rep(1,16),
                          iid = 1:16,
                          pid = c(0,0,0,1,1,0,0,4,6,0,7,0,0,9,11,13),
                          mid = c(0,0,0,2,2,0,0,3,5,0,8,0,0,10,12,14),
                          sex = c(1,2,2,1,2,1,1,2,1,2,1,2,1,2,2,1),
                          aff = rep(1,16))

# calculate identity coefficients
identity_coef <- getIdentityCoef(pedigree = my_pedigree,
                                 number.cores = 1)

head(identity_coef)

## End(Not run)

bahlolab/XIBD documentation built on May 11, 2019, 5:24 p.m.