propShared {adegenet}R Documentation

Compute proportion of shared alleles

Description

The function propShared computes the proportion of shared alleles in a set of genotypes (i.e. from a genind object).

Usage

propShared(obj)

Arguments

obj a genind object.

Details

Computations of the proportion of shared alleles are computed in C. Proportions are computed from all available data, i.e. proportion can be computed as far as there is at least one typed locus in common between two genotypes.

Value

Returns a matrix of proportions

Author(s)

Thibaut Jombart jombart@biomserv.univ-lyon1.fr

See Also

dist.genpop

Examples

## make a small object
data(microbov)
obj <- microbov[1:5,microbov@loc.fac %in% c("L01","L02")]

## verify results
propShared(obj)
genind2df(obj,sep="|")

## Use this similarity measure inside a PCoA
## This is for illustration only:
## the distance should be rendered Euclidean before
## (e.g. using quasieuclid from package ade4).
if(require(ade4)){
matSimil <- propShared(microbov)
matDist <- exp(-matSimil)
D <- as.dist(matDist)
pcoa1 <- dudi.pco(D,scannf=FALSE,nf=3)
s.class(pcoa1$li,microbov$pop,lab=microbov$pop.names)
}

[Package adegenet version 1.2-2 Index]