export            package:adegenet            R Documentation(utf8)

_C_o_n_v_e_r_s_i_o_n _f_u_n_c_t_i_o_n_s _f_r_o_m _a_d_e_g_e_n_e_t _t_o _o_t_h_e_r _R _p_a_c_k_a_g_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     The function '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'.

_U_s_a_g_e:

     genind2genotype(x,pop=NULL,res.type=c("matrix","list"))
     genind2hierfstat(x,pop=NULL)

_A_r_g_u_m_e_n_t_s:

       x: a 'genind' object.

     pop: a factor giving the population of each individual. If NULL,
          it is seeked in x$pop. If NULL again, all individuals are
          assumed from the same population.

res.type: a character (if a vector, only the first element is
          retained), indicating the type of result returned.

_V_a_l_u_e:

     The function '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).

_A_u_t_h_o_r(_s):

     Thibaut Jombart t.jombart@imperial.ac.uk

_R_e_f_e_r_e_n_c_e_s:

     Gregory Warnes and Friedrich Leisch (2007). genetics: Population
     Genetics. R package version 1.2.1.

     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

_S_e_e _A_l_s_o:

     'import2genind'

_E_x_a_m_p_l_e_s:

     if(require(hierfstat)){

     obj <- read.fstat(system.file("data/diploid.dat",package="hierfstat"))

     X <- genind2hierfstat(obj)
     X

     read.fstat.data(paste(.path.package("hierfstat"),"/data/diploid.dat",sep="",collapse=""),nloc=5)
     }
     if(require(genetics)){
     genind2genotype(obj)
     }

