Learn R Programming

prabclus (version 2.3-4)

alleledist: Shared allele distance for diploid loci

Description

Shared allele distance for codominant markers (Bowcock et al., 1994). One minus proportion of alleles shared by two individuals averaged over loci (loci with missing values for at least one individual are ignored).

Usage

alleledist(allelelist,ni,np,count=FALSE)

Value

A symmetrical matrix of shared allele distances between individuals.

Arguments

allelelist

a list of lists. In the "outer" list, there are np lists, one for each locus. In the "inner" list, for every individual there is a vector of two codes (typically characters, see alleleinit) for the two alleles in that locus. Such a list can be constructed by unbuild.charmatrix out of the charmatrix component of an output object of alleleinit.

ni

integer. Number of individuals.

np

integer. Number of loci.

count

logical. If TRUE, the number of the individual to be processed is printed.

References

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.

See Also

alleleinit, unbuild.charmatrix

Examples

Run this code
  data(tetragonula)
  tnb <-
  coord2dist(coordmatrix=tetragonula.coord[1:50,],cut=50,file.format="decimal2",neighbors=TRUE)
  ta <- alleleconvert(strmatrix=tetragonula[1:50,])
  tai <- alleleinit(allelematrix=ta,neighborhood=tnb$nblist,distance="none")
  str(alleledist((unbuild.charmatrix(tai$charmatrix,50,13)),50,13)) 

Run the code above in your browser using DataLab