simFmodel              package:Geneland              R Documentation

_S_i_m_u_l_a_t_i_o_n _o_f _m_u_l_t_i-_l_o_c_u_s _g_e_n_e_t_i_c _d_a_t_a _f_r_o_m _t_h_e _s_p_a_t_i_a_l _F-_m_o_d_e_l

_D_e_s_c_r_i_p_t_i_o_n:

     Simulates multi-locus genotypes and spatial coordinates for 
     individuals belonging to some spatially organised populations.

_U_s_a_g_e:

     simFmodel(nindiv, coordinates = NULL, coord.lim, number.nuclei,
     coord.nuclei = NULL, color.nuclei = NULL,nall, npop, freq.model="Dirichlet",drift=NULL, seed=NULL, plots = FALSE, ploth = FALSE)

_A_r_g_u_m_e_n_t_s:

  nindiv: Integer:  Number of individuals

coordinates: Matrix (2 rows, 'nindiv' columns) of spatial coordinates
          of individuals

coord.lim: Vector of limits of spatial domain to be considered (x min,
          x max, y min, y max) 

number.nuclei: Integer: number of nuclei in the Voronoi tessellation

coord.nuclei: Coordinates of nuclei of Voronoi tessellation

color.nuclei: Population labels of the nuclei (vector of integers of
          size 'number.nuclei')

    nall: Vector of integers giving number of alleles at each locus

    npop: Number of populations 

freq.model: model for frequencies:"Falush" or "Dirichlet" 

   drift: Vector (of size 'npop') of drift factors between 0 and 1
          (only for the Falush model)

    seed: Seed to initialize the random number generator

   plots: Logical: if TRUE, spatial coordinates are ploted

   ploth: Logical: if TRUE, barplots for allele frequencies are ploted

_D_e_t_a_i_l_s:

     'number.nuclei' uniform i.i.d points are randomly spread on the
     rectangular domain. These points generates the so called Voronoi
     tessellation of the domain in 'number.nuclei' polygonal
     sub-domains. Each polygon is given a color uniformly on {1,
     'npop'}. The union of polygons of the color k gives the domain of
     population k. Then 'nindiv' uniform i.i.d  points are randomly
     spread on the domain and stand for the locations of individuals.
     Allele frequencies in the ancestral population are sampled from
     independent Dirichlet D(1,...,1). Allele frequencies in the
     present time population are drawn from Dirichlet distrubution
     whose parameters depend on drift factors 'drift' and allele
     frequencies in the ancestral population. Individual genotypes in
     each population are drawn from the allele frequencies of the
     corresponding population assuming Hardy-Weinberg equilibrium and
     linkage equilibrium.

_V_a_l_u_e:

     A list of variables involved in the simulation. The elements of
     this list are:  coordinates, genotypes, allele.numbers,
     number.nuclei, coord.nuclei, color.nuclei,  frequencies, 
     ancestral.frequencies, drifts, index.nearest.nucleus

_A_u_t_h_o_r(_s):

     Gilles Guillot

_R_e_f_e_r_e_n_c_e_s:

     Falush D., M. Stephens, J.K. Pritchard,  Inference of population
     structure using multilocus genotype data: Linked loci and
     correlated allele frequencies, Genetics, pp 1567-1587, vol 164,
     2003

     G. Guillot, Estoup, A., Mortier, F. Cosson, J.F. A spatial
     statistical model for landscape genetics. Genetics, 170,
     1261-1280, 2005.

     G. Guillot, Mortier, F., Estoup, A. Geneland : A program for
     landscape genetics. Molecular Ecology Notes, 5, 712-715, 2005.

_S_e_e _A_l_s_o:

     Function 'mcmcFmodel' for inference

