Description Usage Arguments Details Value Author(s)

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

1 2 3 | ```
simFmodel(nindiv, coordinates, coord.lim, number.nuclei,
coord.nuclei, color.nuclei,nall, npop, freq.model="Uncorrelated",
drift,dominance="Codominant", plots = FALSE, ploth = FALSE)
``` |

`nindiv` |
Integer: Number of individuals |

`coordinates` |
Matrix (2 rows, |

`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 |

`nall` |
Vector of integers giving number of alleles at each locus |

`npop` |
Number of populations |

`freq.model` |
model for frequencies:"Correlated" or "Uncorrelated" |

`drift` |
Vector (of size |

`dominance` |
A character string "Codominant" or "Dominant". If "Dominant" is chosen, the first allele is treated as a recessive allele and all heterozigous are converted into homozigous for the dominant allele. The presence of the "dominant" allele is coded as 1, the absence of the "dominant" allele is coded as 0. |

`plots` |
Logical: if TRUE, spatial coordinates are ploted |

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

`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.

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

Gilles Guillot

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.