propShared          package:adegenet          R Documentation(utf8)

_C_o_m_p_u_t_e _p_r_o_p_o_r_t_i_o_n _o_f _s_h_a_r_e_d _a_l_l_e_l_e_s

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

     The function 'propShared' computes the proportion of shared
     alleles in a set of genotypes (i.e. from a genind object).

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

     propShared(obj)

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

     obj: a genind object.

_D_e_t_a_i_l_s:

     Computations of the proportion of shared alleles are computed in
     C. Proportions are computed from all available data, i.e.
     proportion can be computed as far as there is at least one typed
     locus in common between two genotypes.

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

     Returns a matrix of proportions

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

     Thibaut Jombart t.jombart@imperial.ac.uk

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

     'dist.genpop'

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

     ## make a small object
     data(microbov)
     obj <- microbov[1:5,microbov@loc.fac %in% c("L01","L02")]

     ## verify results
     propShared(obj)
     genind2df(obj,sep="|")

     ## Use this similarity measure inside a PCoA
     ## This is for illustration only:
     ## the distance should be rendered Euclidean before
     ## (e.g. using quasieuclid from package ade4).
     if(require(ade4)){
     matSimil <- propShared(microbov)
     matDist <- exp(-matSimil)
     D <- as.dist(matDist)
     pcoa1 <- dudi.pco(D,scannf=FALSE,nf=3)
     s.class(pcoa1$li,microbov$pop,lab=microbov$pop.names)
     }

