Marker simulation
Simulates marker genotypes conditional on the pedigree structure and known
genotypes. Note: This function simulates independent realisations at a single
locus. Equivalently, it can be thought of as independent simulations of
identical, unlinked markers. For simulations of a set of markers, see
profileSim().
markerSim( x, N = 1, ids = NULL, alleles = NULL, afreq = NULL, mutmod = NULL, rate = NULL, partialmarker = NULL, loopBreakers = NULL, eliminate = 0, seed = NULL, verbose = TRUE )
x |
A |
N |
A positive integer: the number of (independent) markers to be simulated. |
ids |
A vector containing ID labels of those pedigree members whose genotypes should be simulated. By default, all individuals are included. |
alleles |
(Only if
|
afreq |
(Only if |
mutmod, rate |
Arguments specifying a mutation model, passed on to
|
partialmarker |
Either NULL (resulting in unconditional simulation), a
marker object (on which the simulation should be conditioned) or the name
(or index) of a marker attached to |
loopBreakers |
A numeric containing IDs of individuals to be used as
loop breakers. Relevant only if the pedigree has loops, and only if
|
eliminate |
A non-negative integer, indicating the number of iterations
in the internal genotype-compatibility algorithm. Positive values can save
time if |
seed |
An integer seed for the random number generator (optional). |
verbose |
A logical. |
This implements (with various time savers) the algorithm used in SLINK of the
LINKAGE/FASTLINK suite. If partialmarker is NULL, genotypes are simulated
by simple gene dropping, using simpleSim().
A ped object equal to x except its MARKERS entry, which
consists of the N simulated markers.
Magnus Dehli Vigeland
G. M. Lathrop, J.-M. Lalouel, C. Julier, and J. Ott, Strategies for Multilocus Analysis in Humans, PNAS 81(1984), pp. 3443-3446.
x = nuclearPed(2) # Unconditional simulation markerSim(x, N = 2, alleles = 1:3) # Conditional on one child being homozygous 1/1 x = setMarkers(x, marker(x, '3' = 1, alleles = 1:3)) markerSim(x, N = 2, partialmarker = 1) markerSim(x, N = 1, ids = 4, partialmarker = 1, verbose = FALSE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.