simFmodel: Simulation of multi-locus genetic data from the spatial...

Description Usage Arguments Value

View source: R/simFmodel.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
simFmodel(
  nindiv,
  coordinates,
  coord.lim = c(0, 1, 0, 1),
  number.nuclei,
  coord.nuclei,
  color.nuclei,
  nall,
  npop,
  freq.model = "Uncorrelated",
  drift,
  dominance = "Codominant",
  plots = FALSE,
  ploth = FALSE
)

Arguments

nindiv

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

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:"Correlated" or "Uncorrelated"

drift

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

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

Value

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/Geneland documentation built on Feb. 24, 2020, 11:44 a.m.