sim2pop            package:adegenet            R Documentation(utf8)

_S_i_m_u_l_a_t_e_d _g_e_n_o_t_y_p_e_s _o_f _t_w_o _g_e_o_r_e_f_e_r_e_n_c_e_d _p_o_p_u_l_a_t_i_o_n_s

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

     This simple data set was obtained by sampling two populations
     evolving in a island model, simulated using Easypop (2.0.1). See
     'source' for simulation details. Sample sizes were respectively
     100 and 30 genotypes. The genotypes were given spatial coordinates
     so that both populations were spatially differentiated.

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

     data(sim2pop)

_F_o_r_m_a_t:

     'sim2pop' is a genind object with a matrix of xy coordinates as
     supplementary component.

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

     Thibaut Jombart t.jombart@imperial.ac.uk

_S_o_u_r_c_e:

     Easypop version 2.0.1 was run with the following parameters: - two
     diploid populations, one sex, random mating - 1000 individuals per
     population - proportion of migration: 0.002 - 20 loci - mutation
     rate: 0.0001 (KAM model) - maximum of 50 allelic states - 1000
     generations (last one taken)

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

     Balloux F (2001) Easypop (version 1.7): a computer program for
     oppulation genetics simulations _Journal of Heredity_, *92*:
     301-302

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

     ## Not run: 
     data(sim2pop)

     if(require(hierfstat)){
     ## try and find the Fst
     temp <- genind2hierfstat(sim2pop)
     varcomp.glob(temp[,1],temp[,-1])
     # Fst = 0.038
     }

     ## run monmonier algorithm

     # build connection network
     gab <- chooseCN(sim2pop@other$xy,ask=FALSE,type=2)

     # filter random noise 
     pca1 <- dudi.pca(sim2pop@tab,scale=FALSE, scannf=FALSE, nf=1)

     # run the algorithm
     mon1 <- monmonier(sim2pop@other$xy,dist(pca1$l1[,1]),gab,scanthres=FALSE)

     # graphical display
     temp <- sim2pop@pop
     levels(temp) <- c(17,19)
     temp <- as.numeric(as.character(temp))
     plot(mon1)
     points(sim2pop@other$xy,pch=temp,cex=2)
     legend("topright",leg=c("Pop A", "Pop B"),pch=c(17,19))
     ## End(Not run)

