genind2genotype
and
genind2hierfstat
convert a genind
object into,
respectively, a list of genotypes (class genotypes
, package
genetics
), and a data.frame to be used by the functions of the
package hierfstat
.genind2genotype(x,pop=NULL,res.type=c("matrix","list"))
genind2hierfstat(x,pop=NULL)
genind
object.genind2genotype
converts a genind
object into genotypes
(package genetics
).
If res.type is set to "matrix" (default), the returned value is a
individuals x locus matrix whose columns have the class
genotype
. Such data can be used by LDheatmap
package to
compute linkage disequilibrium.
If res.type is set to "list", the returned value is a list of
genotypes
sorted first by locus and then by population.)
genind2hierfstat
returns a data frame where individuals are
in rows. The first columns is a population factor (but stored as
integer); each other column is a locus. Genotypes are coded as
integers (e.g., 44 is an homozygote 4/4, 56 is an heterozygote
5/6).Jerome Goudet (2005). HIERFSTAT, a package for R to compute and test hierarchical F-statistics. Molecular Ecology, 5:184-186 Fstat (version 2.9.3). Software by Jerome Goudet. http://www2.unil.ch/popgen/softwares/fstat.htm
import2genind