simFmodel {Geneland}R Documentation

Simulation of multi-locus genetic data from the spatial F-model

Description

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

Usage

simFmodel(nindiv, s = NULL, slim, npp, u = NULL, c = NULL,
nloc, nall, nclass, drift, seed=NULL, plots = TRUE, ploth = TRUE, write = FALSE, repout=NULL)

Arguments

nindiv Integer: Number of individuals
s Matrix (2 rows, nindiv columns) of spatial coordinates of individuals
slim Vector of limits of spatial domain to be considered (abs min, abs max, ord min, ord max)
npp Integer: number of nuclei in the Voronoi tessellation
u Coordinates of nuclei of Voronoi tessellation
c Population labels of the nuclei (vector of integers of size npp)
nloc number of loci
nall Vector of integers (of size nloc) giving number of alleles at each locus
nclass Number of populations
drift Vector (of size nclass) of drift factors between 0 and 1
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
write Logical: if TRUE, data are written to directory repout
repout Path to output directory

Details

npp uniform i.i.d points are randomly spread on the rectangular domain. These points generates the so called Voronoi tessellation of the domain in npp polygonal sub-domains. Each polygon is given a color uniformly on {1, nclass}. 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.

Value

Simulated values are written in files in repout directory

Author(s)

Gilles Guillot

References

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

A spatial statistical model for landscape genetics, Guillot, Estoup, Mortier, Cosson, Genetics, 2005

Guillot, G., Geneland : A program for landscape genetics. Molecular Ecology Notes, submited.

See Also

Function mcmcFmodel for inference


[Package Contents]