function to compute average homozygosity within a person

hom.old {GenABEL}R Documentation

function to compute average homozygosity within a person

Description

This function computes average homozygosity (inbreeding) for a set of people, across multiple markers. Can be used for Quality Control (e.g. contamination checks)

Usage

	hom.old(data, snpsubset, idsubset, weight="no")

Arguments

data Object of gwaa.data-class or snp.data-class
snpsubset Subset of SNPs to be used
idsubset People for whom average homozygosity is to be computed
weight When "no", homozygosity is computed as a proportion of homozygous genotypes. When "freq", an estimate of inbreeding coefficint is computed (see details).

Details

With "freq" option, for person i inbreeding is estimated with

f_i = \frac{O_i - E_i)}{(L_i - E_i)}

where O_i is observed homozygosity, L_i is the number of SNPs measured in individual i and

E_i = Σ_{j=1}^{L_i} (1 - 2 p_j (1 - p_j) \frac{T_{Aj}}{T_{Aj}-1})

where T_{Aj} is the numer of measured genotypes at locus j.

Only polymorphic loci with number of measured henotypes >1 are used with this option.

This measure is the same as used by PLINK (see reference).

You should use as many people and markers as possible when estimating inbreeding from marker data.

Value

With option weight="no": A matrix with rows corresponding to the ID names and colums showing the number of genotypes measured (NoMeasured) and homozygosity (Hom).

With option weight="freq": the same as above + expected homozygosity (E(Hom)) and the estimate of inbreeding, F.

Author(s)

Yurii Aulchenko

References

Purcell S. et al, (2007) PLINK: a toolset for whole genome association and population-based linkage analyses. Am. J. Hum. Genet.

See Also

ibs, gwaa.data-class, snp.data-class

Examples

data(ge03d2)
h <- hom(ge03d2[,c(1:100)])
homsem <- h[,"Hom"]*(1-h[,"Hom"])/h[,"NoMeasured"]
plot(h[,"Hom"],homsem)
# wrong analysis: one should use all people (for right frequency) and markers (for right F) available!
h <- hom(ge03d2[,c(1:10)])
h

[Package GenABEL version 1.6-7 Index]