Auxiliary functions         package:adegenet         R Documentation

_U_t_i_l_i_t_i_e_s _f_u_n_c_t_i_o_n_s _f_o_r _a_d_e_g_e_n_e_t _o_b_j_e_c_t_s

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

     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.

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

     truenames(x)
     seploc(x,truenames=FALSE)

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

       x: a 'genind' or 'genpop' object.

truenames: a logical indicating whether generic labels (FALSE,default)
          or true names should be used (TRUE).

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

     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.

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

     Thibaut Jombart jombart@biomserv.univ-lyon1.fr

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

     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
     }

