relatedness: Determine pairwise relatedness

View source: R/statistics.R

relatednessR Documentation

Determine pairwise relatedness

Description

Relatedness is determined according to genome-wide relationship assessment of Yang et al. 2010 equation 6, on a per sample basis (with itself and others), using SNPs.

Usage

relatedness(
  vcf,
  plot = TRUE,
  threshold = 0.5,
  verbose = TRUE,
  parallel = FALSE
)

Arguments

vcf

an imported vcf file in a list using readVCF or a data frame of genotypes generated using hetTgen

plot

logical. Whether to plot relatedness of samples against themselves, among themselves and outliers

threshold

numerical. A value indicating to filter the individuals of relatedness among themselves. Default 0.5 (siblings)

verbose

logical. Show progress.

parallel

logical. Parallelize the process

Details

According to Yang et al. (2010), out breeding non-related pairs should have a relatedness value of zero while the individual with itself will have a relatedness value of one. Relatedness value of ~0.5 indicates siblings.

Value

A data frame of individuals and relatedness score A_{jk}

Author(s)

Piyal Karunarathne, Klaus Schliep

References

Yang, J., Benyamin, B., McEvoy, B. et al. Common SNPs explain a large proportion of the heritability for human height. Nat Genet 42, 565569 (2010).

Examples

## Not run: vcf.file.path <- paste0(path.package("rCNV"), "/example.raw.vcf.gz")
vcf <- readVCF(vcf.file.path=vcf.file.path)
relate<-relatedness(vcf)
## End(Not run)


rCNV documentation built on Sept. 30, 2024, 9:39 a.m.