Description Usage Arguments Details Value
Calculate individual heterozygosity
1 |
gt |
A genotype matrix with N rows and L columns, where N is the number of individuals and L is the number of loci, for which the i,jth element gives the number of the counted allele in each individual at each locus. |
nLoci |
An optional argument giving the number of genotyped
base pairs in each individual. If not specified,
this is assumed to be the number of non-missing
genotypes in each row of |
The data matrix gt
should consist of
0s, 1s, and 2s, with missing data indicated with
NA
. This can be generated from a VCF file
using vcf2R
. If nLoci
is not
specified, and gt
consists only of
polymorphic loci, this function will return
heterozygosity at polymorphic sites, which may not
be comparable across datasets.
A vector giving the proportion of loci that are heterozygous in each individual.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.