The ASD between two diploid genotypes is (Gao and Martin, 2009):
$$\frac{1}{L}\sum_{j=1}^L d_j$$
where \(L\) is the number loci, \(d_j\) is the value for the
\(j\)th locus: 0 if both genotypes are identical, 1 if they have one
allele in common, or 2 if they have no allele in common.
dist.asd
works for all diploid genotypes (phased or unphased,
with two alleles or more). Note that the required conditions are not
checked by the present function: see the functions below.
The pairwise deletion is done with respect to missing values coded as
NA
, not on the `null alleles' (`0' or `.'). You
may need to use the function nullAlleles2NA
first if
your data has genotypes with null alleles that you want to treat as
missing values.