divlocus function

Diversity score

Diversity score

Compute a measure of genetic diversity at each locus

divlocus(dat)

Arguments

  • dat: A binary matrix, rows are haplotypes and columns are binary markers

Details

This function implements a measure of diversity for a locus jj

as in Clayton (2002). If zijz_ij represents the allele jj of haplotype ii, for i=1,...,Ni=1,...,N and assuming that alleles are coded as 0 and 1, the diversity measure can be written as

Dj=2N(i=1Nzij2(i=1Nzij)2) D_j = 2*N( \sum_{i=1}^N z_{ij}^2 - (\sum_{i=1}^N z_{ij}) ^2 )

Returns

A vector containing the diversity measure for all markers

References

D. Clayton. Choosing a set of haplotype tagging SNPs from a larger set of diallelic loci. 2002. www-gene.cimr.cam.ac.uk/clayton/software/stata/htSNP/htsnp.pdf

Author(s)

Giovanni Montana

Examples

data(ACEdata) divlocus(ACEdata)
  • Maintainer: Apostolos Dimitromanolakis
  • License: GPL (>= 2)
  • Last published: 2017-06-07

Useful links