
Last chance! 50% off unlimited learning
Sale ends in
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)
genind
or genpop
object.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.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
}
Run the code above in your browser using DataLab