Distances between communities, auxiliary functions
Auxiliary functions for communitydist
. phipt
computes phiPT/phiST (Peakall and Smouse, 2012, Meirmans,
2006) between two communities. cfchord
computes the
chord-distance (Cavalli-Sforza and Edwards, 1967) between two lists or
locus-wise relative allele frequencies. shared.problist
computes a straightforward generalisation of the shared allele
distance (Bowcock et al., 1994) between
individuals for communities, namely the ‘overlap’, i.e., sum of the
minima of the
allele relative frequencies. diploidcomlist
constructs the
input lists for cfchord
and shared.problist
from an
alleleobject
. It provides relative frequencies for all
alles of all loci in all communities.
phipt(alleleobj,comvector,i,j) cfchord(p1,p2) shared.problist(p1,p2) diploidcomlist(alleleobj,comvector,diploid=TRUE)
alleleobj |
if |
comvector |
vector of integers indicating to which community an individual belongs. |
i |
integer. Number of community. |
j |
integer. Number of community. The phiPT-distance is computed
between the communities numbered |
p1 |
list. Every list entry refers to a locus and is a vector of relative frequencies of the alleles present in that locus in a community. |
p2 |
list. Every list entry refers to a locus and is a vector of
relative frequencies of the alleles present in that locus in a
community. The chord or shared allele distance is computed between
the communities encoded by |
diploid |
logical, indicating whether loci are diploid, see
|
cfchord
gives out the value of the chord
distance. shared.problist
gives out the distance
value. diploidcomlist
gives out a two-dimensional list. The
list has one entry for each community, which is itself a list. This
community list has one entry for each locus, which is a vector that
gives the relative frequencies of the different alleles in
phipt
gives out a list with components phipt, vap, n0,
sst, ssg, msa, msw
. These refer to the notation on p.2.12 and 2.15 of
Peakall and Smouse (2012).
phipt |
value of phiPT. |
vap |
variance among (between) populations (communities). |
n0 |
standardisation factor N0, see p.2.12 of Peakall and Smouse (2012). |
sst |
total distances sum of squares. |
ssg |
vector with two non- |
msa |
mean square between communities. |
msw |
mean square within communities. |
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.
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
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) tetracoms <- c(rep(1:3,each=3),4,5,rep(6:11,each=2),12,rep(13:19,each=2)) phipt(tai,tetracoms,4,6) tdip <- diploidcomlist(tai,tetracoms,diploid=TRUE) cfchord(tdip[[4]],tdip[[6]]) shared.problist(tdip[[4]],tdip[[6]])
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.