Auxiliary functions {adegenet} | R Documentation |
Theses functions are to be used with genind
and
genpop
objects.
truenames
returns elements of the object with using true names
(as opposed to generic labels) for individuals, markers, alleles, and population.
The function seploc
splits the table (x\$tab
) by marker,
allowing separate analysis of markers.
truenames(x) seploc(x,truenames=FALSE)
x |
a genind or genpop object. |
truenames |
a logical indicating whether generic labels (FALSE,default) or true names should be used (TRUE). |
The function truenames
returns a matrix similar to x$tab
but with true labels. If x$pop exists, it returns a list with this
matrix ($tab) and a population vector with true names ($pop).
The function seploc
applied to genind
or genpop
objects returns a list of matrices, one per marker.
Thibaut Jombart jombart@biomserv.univ-lyon1.fr
data(microbov) # restore true names truenames(microbov)$tab[1:5,1:5] # isolate each marker obj <- seploc(microbov,truenames=TRUE) names(obj) # make a new object with INRA5 head(obj$INRA5) inra5.gind <- as.genind(obj$INRA5) inra5.gind # perform tests only on this marker if(require(genetics)){ hw.test <- HWE.test.genind(inra5.gind,pop=microbov$pop,res.type="matrix",permut=TRUE) hw.test } if(require(hierfstat)){ g.test <- gstat.randtest(inra5.gind,pop=microbov$pop,nsim=99) g.test }