Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

simpleSim

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 equi-frequent.

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 pedmut::mutationModel() object, i.e., list of mutation matrices named 'female' and 'male'.

seed

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

verbose

a logical.

Details

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

Value

a ped object equal to x in all respects except its MARKERS entry, which consists of the N simulated markers.

Author(s)

Magnus Dehli Vigeland

See Also

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

Forensic Pedigree Analysis and Relatedness Inference

v1.3.0
GPL-3
Authors
Magnus Dehli Vigeland [aut, cre] (<https://orcid.org/0000-0002-9134-4962>), Egeland Thore [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.