genpop
object.
Currently, five distances are available, some of which are euclidian
(see details).
A non-euclidian distance can be transformed into an Euclidian one
using quasieuclid
in order to perform a
Principal Coordinate Analysis dudi.pco
(both
functions in ade4
).
The function dist.genpop
is based on former dist.genet
function of ade4
package.dist.genpop(x, method = 1, diag = FALSE, upper = FALSE)
genpop
print.dist
print.dist
dist
between the rows of the data framemethod
computes the distance matrices between populations using the frequencies $p_{ij}^k$.
1. Nei's distance (not Euclidian):
$D_1(a,b)=- \ln(\frac{\sum_{k=1}^{\nu} \sum_{j=1}^{m(k)}
p_{aj}^k p_{bj}^k}{\sqrt{\sum_{k=1}^{\nu} \sum_{j=1}^{m(k)}
{(p_{aj}^k) }^2}\sqrt{\sum_{k=1}^{\nu} \sum_{j=1}^{m(k)}
{(p_{bj}^k)}^2}})$
2. Angular distance or Edwards' distance (Euclidian):
$D_2(a,b)=\sqrt{1-\frac{1}{\nu} \sum_{k=1}^{\nu}
\sum_{j=1}^{m(k)} \sqrt{p_{aj}^k p_{bj}^k}}$
3. Coancestrality coefficient or Reynolds' distance (Euclidian):
$D_3(a,b)=\sqrt{\frac{\sum_{k=1}^{\nu}
\sum_{j=1}^{m(k)}{(p_{aj}^k - p_{bj}^k)}^2}{2 \sum_{k=1}^{\nu} (1-
\sum_{j=1}^{m(k)}p_{aj}^k p_{bj}^k)}}$
4. Classical Euclidean distance or Rogers' distance (Euclidian):
$D_4(a,b)=\frac{1}{\nu} \sum_{k=1}^{\nu} \sqrt{\frac{1}{2}
\sum_{j=1}^{m(k)}{(p_{aj}^k - p_{bj}^k)}^2}$
5. Absolute genetics distance or Provesti 's distance (not Euclidian):
$D_5(a,b)=\frac{1}{2{\nu}} \sum_{k=1}^{\nu} \sum_{j=1}^{m(k)}
|p_{aj}^k - p_{bj}^k|$Distance 2: Edwards, A.W.F. (1971) Distance between populations on the basis of gene frequencies. Biometrics, 27, 873--881. Cavalli-Sforza L.L. and Edwards A.W.F. (1967) Phylogenetic analysis: models and estimation procedures. Evolution, 32, 550--570. Hartl, D.L. and Clark, A.G. (1989) Principles of population genetics. Sinauer Associates, Sunderland, Massachussetts (p. 303).
Distance 3: Reynolds, J. B., B. S. Weir, and C. C. Cockerham. (1983) Estimation of the coancestry coefficient: basis for a short-term genetic distance. Genetics, 105, 767--779.
Distance 4: Rogers, J.S. (1972) Measures of genetic similarity and genetic distances. Studies in Genetics, Univ. Texas Publ., 7213, 145--153. Avise, J. C. (1994) Molecular markers, natural history and evolution. Chapman & Hall, London.
Distance 5: Prevosti A. (1974) La distancia gen�tica entre poblaciones. Miscellanea Alcob�, 68, 109--118. Prevosti A., Oca~na J. and Alonso G. (1975) Distances between populations of Drosophila subobscura, based on chromosome arrangements frequencies. Theoretical and Applied Genetics, 45, 231--241. For more information on dissimilarity indexes: Gower J. and Legendre P. (1986) Metric and Euclidian properties of dissimilarity coefficients. Journal of Classification, 3, 5--48 Legendre P. and Legendre L. (1998) Numerical Ecology, Elsevier Science B.V. 20, pp274--288.
quasieuclid
,dudi.pco
if(require(ade4)){
data(microsatt)
obj <- as.genpop(microsatt$tab)
listDist <- lapply(1:5, function(i) quasieuclid(dist.genpop(obj,met=i)))
for(i in 1:5) {attr(listDist[[i]],"Labels") <- obj$pop.names}
listPco <- lapply(listDist, dudi.pco,scannf=FALSE)
par(mfrow=c(2,3))
for(i in 1:5) {scatter(listPco[[i]],sub=paste("Dist:", i))}
}
Run the code above in your browser using DataLab