Learn R Programming

SeqVarTools (version 1.10.0)

inbreedCoeff: Inbreeding coefficient

Description

Calculates the inbreeding coefficient by variant or by sample

Usage

"inbreedCoeff"(gdsobj, margin=c("by.variant", "by.sample"), use.names=FALSE)

Arguments

gdsobj
A SeqVarGDSClass object with VCF data.
margin
Possible values are "by.variant" or "by.sample," indicating whether the calculation should be done over all samples for each variant, or over all variants for each sample.
use.names
A logical indicating whether to assign variant or sample IDs as names of the output vector.

Value

Values for the inbreeding coefficient.

Details

For inbreeding coefficients by variant, calculates 1 - observed heterozygosity / expected heterozygosity. For individual inbreeding coefficients (margin="by.sample"), calculates Visscher's estimator described in Yang et al. (2010).

References

Yang J, Benyamin B, McEvoy BP, Gordon S, Henders AK, Nyholt DR, Madden PA, Heath AC, Martin NG, Montgomery GW, Goddard ME, Visscher PM. 2010. Common SNPs explain a large proportion of the heritability for human height. Nat Genet. 42(7):565-9. Epub 2010 Jun 20.

See Also

SeqVarGDSClass, applyMethod

Examples

Run this code
gds <- seqOpen(seqExampleFileName("gds"))
f <- inbreedCoeff(gds, margin="by.variant")
range(f, na.rm=TRUE)

ic <- inbreedCoeff(gds, margin="by.sample")
range(ic)
seqClose(gds)

Run the code above in your browser using DataLab