Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dist.asd

Allelic Sharing Distance


Description

This function computes the allelic sharing distance (ASD) for diploid genotypes.

Usage

dist.asd(x, scaled = TRUE)

Arguments

x

an object of class "loci".

scaled

a logical value specifying whether the distances should be scaled by the number of loci.

Details

The ASD between two diploid genotypes is (Gao and Martin, 2009):

(1/L)sum d_j, j = 1, ... L

where L is the number loci, d_j is the value for the jth 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.

Value

an object of class "dist".

Author(s)

Emmanuel Paradis

References

Gao, X. and Martin, E. R. (2009) Using allele sharing distance for detecting human population stratification. Human Hederity, 68, 182–191.

See Also

Examples

data(jaguar)
## ASD for micro-satellites:
d <- dist.asd(jaguar)
co <- rainbow(nlevels(jaguar$pop))
plot(nj(d), "u", tip.color = co[jaguar$pop], font = 2, lab4 = "a")
legend("topleft", legend = levels(jaguar$pop), text.col = co, text.font = 2)

pegas

Population and Evolutionary Genetics Analysis System

v1.0
GPL (>= 2)
Authors
Emmanuel Paradis [aut, cre, cph] (<https://orcid.org/0000-0003-3092-2199>), Thibaut Jombart [aut, cph] (<https://orcid.org/0000-0003-2226-8692>), Zhian N. Kamvar [aut, cph] (<https://orcid.org/0000-0003-1458-7108>), Brian Knaus [aut, cph] (<https://orcid.org/0000-0003-1665-4343>), Klaus Schliep [aut, cph] (<https://orcid.org/0000-0003-2941-0161>), Alastair Potts [aut, cph] (<https://orcid.org/0000-0003-0919-7279>), David Winter [aut, cph] (<https://orcid.org/0000-0002-6165-0029>)
Initial release
2021-04-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.