simdata {Geneland}R Documentation

Simulation of georeferenced genotypes under an IBD + barrier model

Description

Simulates coordinates and genotypes for a npop populations. Each population is supposed to be under an Isolation by Distance model and different populations are supposed to be separated by impermeable barriers. The barriers are given by a Poisson-Voronoi tessellation.

Usage

simdata(nindiv,
coord.indiv ,
coord.lim,
rate ,
number.nuclei ,
coord.nuclei ,
color.nuclei ,
allele.numbers,
IBD,
model,
alpha,
beta,
gamma,
npop,
seed.coord ,
seed.tess ,
seed.freq ,
give.tess.grid=FALSE,
give.freq.grid = FALSE,
npix ,
comp.Fst = FALSE,
comp.Dsigma2=FALSE,
comp.diff=FALSE,
width,
plot.pairs.borders=FALSE)

Arguments

nindiv Number of indivuals
coord.indiv Coordinates of the individuals
coord.lim Limits of the geographical domain. The domain is supposed to be rectangular and the limits are given as (abs min, abs max, ord min, ord max)
rate Rate of the Poisson process governing the hidden tessellation
number.nuclei Number of nuclei in the tessellation (if given, then rate is ignored)
coord.nuclei Coordinates of the nuclei (the number of coordinates of the nuclei given here as a matrix has to comply with number.nuclei )
color.nuclei Population membeship of the nuclei: a vector of integer of length number of nuclei whose values are between 1 and npop
allele.numbers A vector giving the number of alleles observed at each locus
IBD Logical. If TRUE, then the allele frequencies are simulated according to an IBD model. If FALSE, panmixia is assumed.
model Model of spatial covariance function used for the underlying Gaussian fields (see documentation of package RandomFields for details)
alpha Parameter of the spatial Dirichlet vector field of frequencies (a positive real)
beta Scale parameter of the spatial covariance function used for the underlying Gaussian fields. A positive real number (see documentation of package RandomFields for details)
gamma Smoothing parameter of spatial covariance function used for the underlying Gaussian fields. (see documentation of package RandomFields for details)
npop Number of Populations
seed.coord Random seed to initialise the simulation of the coordinates (mostly for debugging)
seed.tess Random seed to initialise the simulation of the tessellation (mostly for debugging)
seed.freq Random seed to initialise the simulation of the frequencies (mostly for debugging)
give.freq.grid Logical to tell whether frequencies on a grid are also returned
give.tess.grid Logical to tell whether population memberships of pixels on a grid are also returned
npix A vector of two integers telling how many horizontal and vertical pixel should contain the grid for the graphical representations
comp.Fst Logical to tell whether Fst, Fis and Fit should be computed
comp.Dsigma2 Logical to tell whether IBD index Dsgma2 should be computed
comp.diff Logical to tell whether the local differentiation across the barriers should be computed
width Real number specifying the width around the barrier in the computation of its local differentiation
plot.pairs.borders Logical to tell whether the pairs of individuals coming into the computation of the differentiation of the barriers should be plotted

Value

A list whose components can be seen using summary

Author(s)

Arnaud Estoup, Gilles Guillot, Filipe Santos

References

G. Guillot, F. Santos, A. Estoup. Inference in population genetics with Geneland: a sensitivity analysis to spatial sampling scheme, null alleles and isolation by distance. Submitted.

See Also

Function show.simdata to make graphical display of simulated data.

Examples

## Not run: 
dataset <- simdata(nindiv=100,
             number.nuclei=10,
             allele.numbers=rep(5,3),
             model="stable",
             IBD=TRUE,
             alpha=1,
             beta=1,
             gamma=1,
             npop=3,
             give.tess.grid=TRUE,
             give.freq.grid=TRUE,
             npix=c(10,10),
             comp.Fst=TRUE,
             comp.Dsigma2=TRUE,
             comp.diff=TRUE,
             width=0.1,
             plot.pairs.borders=TRUE)
## End(Not run)

[Package Geneland version 3.1.4 Index]