simdata: Simulation of georeferenced genotypes under an IBD + barrier...

Description Usage Arguments Value Author(s) References See Also Examples

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
            simdata(nindiv,
                    coord.indiv,
                    coord.lim=c(0,1,0,1),
                    npop,
                    rate,                        
                    number.nuclei,
                    coord.nuclei,
                    color.nuclei,
                    allele.numbers,
                    sim.gen=FALSE,
                    IBD=TRUE,
                    model="stable",
                    alpha=1,
                    beta=1,
                    gamma=1.8,
                    sim.quanti=FALSE,
                    nquanti.var,
                    mean.quanti,
                    sd.quanti,
                    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)

npop

Number of Populations

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

sim.gen

Logical to say whether genetic data should be simulated

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)

sim.quanti

Logical to say whether quantitative data should be simulated

nquanti.var

Number of quantitative variables to be simulated

mean.quanti

Mean of the quantitative variables in the various groups. A matrix with npop lines and nvar.quant columns

sd.quanti

Standard deviation of the quantitative variables in the various groups. A matrix with npop lines and nvar.quant columns

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
dataset <- simdata(nindiv=100,
             sim.gen=TRUE,
             number.nuclei=10,
             allele.numbers=rep(5,3),
             model="stable",
             IBD=TRUE,
             alpha=1,
             beta=1,
             gamma=1,
             npop=3,
             sim.gen=TRUE,
             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)

Geneland documentation built on April 14, 2017, 2:31 p.m.