simpleSim: Unconditional marker simulation

View source: R/markerSim.R

simpleSimR Documentation

Unconditional marker simulation

Description

Unconditional simulation of unlinked markers

Usage

simpleSim(
  x,
  N,
  alleles,
  afreq,
  ids,
  Xchrom = FALSE,
  mutmod = NULL,
  seed = NULL,
  verbose = TRUE
)

Arguments

x

A ped object.

N

A positive integer: the number of markers to be simulated.

alleles

A vector with allele labels.

afreq

A numeric vector of allele frequencies. If missing, the alleles are assumed to be equifrequent.

ids

A vector containing ID labels of those pedigree members whose genotypes should be simulated.

Xchrom

A logical: X linked markers or not?

mutmod

A list of mutation matrices named 'female' and 'male'.

seed

An integer seed for the random number generator (optional).

verbose

A logical.

Details

Simple genotype simulation, performed by first distributing alleles randomly to all founders, followed by Mendelian gene dropping down throughout the pedigree (i.e., for each non-founder a random allele is selected from each of the parents). Finally, genotypes of individuals not included in ids are removed.

Value

A ped object equal to x except its MARKERS entry, which consists of the N simulated markers.

See Also

markerSim()

Examples

x = nuclearPed(1)
simpleSim(x, N = 3, afreq = c(0.5, 0.5))

y = cousinPed(1, child = TRUE)
simpleSim(y, N = 3, alleles = LETTERS[1:10])


forrel documentation built on Sept. 11, 2024, 9:15 p.m.