genoweight: Compute a matrix of weights accounting for recurrent...

Description Usage Arguments Details Value Note Author(s) References Examples

Description

Create a matrix of weights accounting for recurrent genotypes following Wagner et al (2005).

Usage

1
genoweight(X, genotypes)

Arguments

X

a ggene object.

genotypes

A vector giving genotype identity. Typically produced by genocount.

Details

The weights are computed as the inverse of the number of similar genotypes following the proposition of Wagner et al (2005).

Value

A dist object corresponding to the matrix of weights for recurent genotypes. Each individual receives a weight corresponding to the inverse of the number of similar genotypes.

Note

The first example below illustrates the use of genoweight with the example given in Wagner et al. 2005 page 1752.

Author(s)

Jean-Pierre Rossi <ggene.package@gmail.com>

References

Wagner, H. H., R. Holderegger, S. Werth, F. Gugerli, S. E. Hoebee and C. Scheidegger. 2005. Variogram analysis of the spatial genetic structure of continuous populations using multilocus microsatellite data. Genetics 169, 1739-1752.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(Wagner)
count <- genocount(X=Wagner) ;  count
mat <- genoweight(X=Wagner,genotyp=count$vec) ; mat

data(crypho)
#compute the weights
count <- genocount(X=crypho)
mat <- genoweight(X=crypho,genotyp=count$vec)

#compute the weighted variogram
wva <- varioWeight(X=crypho, weights=mat)

## Not run: 
#performs the randomizations on weighted variogram
env <- randsvariog(var=wva, X=crypho, nsim=9, bounds=NULL, save.sim=FALSE, weights=mat)
## End(Not run)

ggene documentation built on May 2, 2019, 5:54 p.m.