genind            package:adegenet            R Documentation(utf8)

_a_d_e_g_e_n_e_t _f_o_r_m_a_l _c_l_a_s_s (_S_4) _f_o_r _i_n_d_i_v_i_d_u_a_l _g_e_n_o_t_y_p_e_s

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

     The S4 class 'genind' is used to store individual genotypes.
      It contains several components described in the 'slots' section).
      The 'summary' of a 'genind' object invisibly returns a list of
     component. The function '.valid.genind' is for internal use. The
     function 'genind' creates a genind object from a valid table of
     alleles corresponding to the '@tab' slot. Note that as in other S4
     classes, slots are accessed using @ instead of $.

_S_l_o_t_s:


     '_t_a_b': matrix of genotypes (in rows) for all alleles (in columns).
          The table differs depending on the '@type' slot:
           - 'codom': values are frequencies ; '0' if the genotype does
          not have the corresponding allele, '1' for an homozygote and
          0.5 for an heterozygte.
           - 'PA': values are presence/absence of alleles.
           In all cases, rows and columns are given generic names.

     '_l_o_c._n_a_m_e_s': character vector containing the real names of the
          loci

     '_l_o_c._f_a_c': locus factor for the columns of 'tab'

     '_l_o_c._n_a_l_l': integer vector giving the number of alleles per locus

     '_a_l_l._n_a_m_e_s': list having one component per locus, each containing
          a character vector of alleles names

     '_c_a_l_l': the matched call

     '_i_n_d._n_a_m_e_s': character vector containing the real names of the
          individuals. Note that as Fstat does not store these names,
          objects converted from .dat files will contain empty
          'ind.names'.

     '_p_l_o_i_d_y': an integer indicating the degree of ploidy of the
          genotypes. Beware: 2 is not an integer, but as.integer(2) is.

     '_t_y_p_e': a character string indicating the type of marker: 'codom'
          stands for 'codominant' (e.g. microstallites, allozymes);
          'PA' stands for 'presence/absence' (e.g. AFLP).

     '_p_o_p': (optional) factor giving the population of each individual

     '_p_o_p._n_a_m_e_s': (optional) vector giving the real names of the
          populations

     '_o_t_h_e_r': (optional) a list containing other information

_E_x_t_e_n_d_s:

     Class '"gen"', directly. Class '"indInfo"', directly.

_M_e_t_h_o_d_s:


     _n_a_m_e_s 'signature(x = "genind")': give the names of the components
          of a genind object

     _p_r_i_n_t 'signature(x = "genind")': prints a genind object

     _s_h_o_w 'signature(object = "genind")': shows a genind object (same
          as print)

     _s_u_m_m_a_r_y 'signature(object = "genind")': summarizes a genind
          object, invisibly returning its content

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

     Thibaut Jombart t.jombart@imperial.ac.uk

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

     'as.genind', 'is.genind', 'genind2genpop', 'genpop',
     'import2genind', 'read.genetix', 'read.genepop', 'read.fstat',
     'na.replace'

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

     showClass("genind")

     obj <- read.genetix(system.file("files/nancycats.gtx",package="adegenet"),missing="mean")
     obj
     validObject(obj)
     summary(obj)

     # test inter-colonies structuration
     if(require(hierfstat)){
     gtest <- gstat.randtest(obj,nsim=99)
     gtest
     plot(gtest)
     }

     # perform an inter-class PCA
     if(require(ade4)){
     pca1 <- dudi.pca(obj@tab,scannf=FALSE,scale=FALSE)
     pcabet1 <- between(pca1,obj@pop,scannf=FALSE)
     pcabet1

     s.class(pcabet1$ls,obj@pop,sub="Inter-class PCA",possub="topleft",csub=2)
     add.scatter.eig(pcabet1$eig,2,xax=1,yax=2)
     }

