Distances between communities
Constructs distances between communities: chord- (Cavalli-Sforza and Edwards, 1967), phiPT/phiST (Peakall and Smouse, 2012, Meirmans, 2006), three versions of the shared allele distance between communities, and geographical distance between communities.
communitydist(alleleobj,comvector="auto",distance="chord", compute.geodist=TRUE,out.dist=FALSE, grouping=NULL,geodist=NA,diploid=TRUE, phiptna=NA,...)
alleleobj |
if |
comvector |
either a vector of integers indicating to which
community an individual belongs (these need to be numbered from 1 to
a maximum number without interruption), or |
distance |
one of |
compute.geodist |
logical, indicating whether geographical distances between communities should be generated. |
out.dist |
logical, indicating whether |
grouping |
something that can be coerced into a factor, for
passing on to |
geodist |
matrix or |
diploid |
logical, indicating whether loci are diploid, see
|
phiptna |
if |
... |
optional arguments to be passed on to |
All genetic distances between communities are based on the information
given in alleleobj
; either on the alleles directly or on a genetic
distance (distmat
-component, see alleleinit
).
The possible genetic distance measures between communities are as follows:
"chord"
: chord-distance (Cavalli-Sforza and Edwards,
1967)
"phipt"
: phiPT-distance implemented according to
Peakall and Smouse, 2012. This also appears in the literature under
the name phiST (Meirmans, 2006, although the definition there is
incomplete and we are not sure whether this is identical).
"shared.average"
: average of between-community genetic
distances.
"shared.chakraborty"
: between-community shared allele
distance according to Chakraborty and Jin (1993).
"shared.problist"
: this implements the shared allele
distance (Bowcock et al., 1994) for individuals directly for
communities (one minus proportion of alleles shared by two
communities averaged over loci).
list with components
comvector |
integer vector of length of the number of individuals, indicating their community membership. |
dist |
genetic distances between communities. Parameter |
cgeodist |
if |
comgroup |
vector of length of the number of communities. If
|
Bowcock, A. M., Ruiz-Linares, A., Tomfohrde, J., Minch, E., Kidd, J. R., Cavalli-Sforza, L. L. (1994) High resolution of human evolutionary trees with polymorphic microsatellites. Nature 368, 455-457.
Cavalli-Sforza, L. L. and Edwards, A. W. F. (1967) Phylogenetic Analysis - Models and Estimation Procedures. The American Journal of Human Genetics 19, 233-257.
Chakraborty, R. and Jin, L. (1993) Determination of relatedness between individuals using DNA fingerprinting. Human Biology 65, 875-895.
Meirmans, P. G. (2006) Using the AMOVA framework to estimate a standardized genetic differentiation measure. Evolution 60, 2399-2402.
Peakall, R. and Smouse P.E. (2012) GenAlEx Tutorial 2. https://biology-assets.anu.edu.au/GenAlEx/Tutorials.html
communities
; refer to phipt
for
computation of distances between specific pairs of communities.
diploidcomlist
produces relative frequencies for all
alles of all loci in all communities (on which the chord- and the
"shared.problist"
-distances are based).
options(digits=4) data(tetragonula) tnb <- coord2dist(coordmatrix=tetragonula.coord[83:120,],cut=50, file.format="decimal2",neighbors=TRUE) ta <- alleleconvert(strmatrix=tetragonula[83:120,]) tai <- alleleinit(allelematrix=ta,neighborhood=tnb$nblist) tetraspec <- c(rep(1,11),rep(2,13),rep(3,14)) tetracoms <- c(rep(1:3,each=3),4,5,rep(6:11,each=2),12,rep(13:19,each=2)) c1 <- communitydist(tai,comvector=tetracoms,distance="chord", geodist=tnb$distmatrix,grouping=tetraspec) c2 <- communitydist(tai,comvector=tetracoms,distance="phipt", geodist=tnb$distmatrix,grouping=tetraspec,compute.geodist=FALSE) c3 <- communitydist(tai,comvector=tetracoms,distance="shared.average", geodist=tnb$distmatrix,grouping=tetraspec,compute.geodist=FALSE) c4 <- communitydist(tai,comvector=tetracoms,distance="shared.chakraborty", geodist=tnb$distmatrix,grouping=tetraspec,compute.geodist=FALSE) c5 <- communitydist(tai,comvector=tetracoms,distance="shared.problist", geodist=tnb$distmatrix,grouping=tetraspec,compute.geodist=FALSE) round(c1$cgeodist,digits=1) c1$comvector c2$comvector c3$comvector c4$comvector c5$comvector round(c1$dist,digits=2) round(c2$dist,digits=2) round(c3$dist,digits=2) round(c4$dist,digits=2) round(c5$dist,digits=2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.