inbreedCoeff {SeqVarTools} | R Documentation

## Inbreeding coefficient

### Description

Calculates the inbreeding coefficient by variant or by sample

### Usage

    ## S4 method for signature 'SeqVarGDSClass'
    inbreedCoeff(gdsobj, margin=c("by.variant", "by.sample"), use.names=FALSE,
        parallel=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.
`parallel` | Logical, numeric, or other value to control parallel processing; see `seqParallel` for details. Only applies if `margin="as.variant"`.

### 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).

### Value

Values for the inbreeding coefficient.

### Author(s)

Xiuwen Zheng, Stephanie Gogarten

### 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

    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)

[Package SeqVarTools version 1.30.0 Index]