markerSim {paramlink} | R Documentation |
Marker simulation
Description
Simulates marker genotypes conditional on the pedigree structure, affection statuses and disease model.
Usage
markerSim(
x,
N = 1,
available = NULL,
alleles = NULL,
afreq = NULL,
partialmarker = NULL,
loop_breakers = NULL,
eliminate = 0,
seed = NULL,
verbose = TRUE
)
Arguments
x |
a |
N |
a positive integer: the number of markers to be simulated |
available |
a vector containing IDs of the available individuals, i.e. those whose genotypes should be simulated. By default, all individuals are included. |
alleles |
a vector containing the alleles for the marker to be
simulation. If a single integer is given, this is interpreted as the number
of alleles, and the actual alleles as |
afreq |
a vector of length 2 containing the population frequencies for
the marker alleles. Must be NULL if |
partialmarker |
Either NULL (resulting in unconditional simulation), a
marker object (on which the simulation should be conditioned) or the index
of an existing marker of |
loop_breakers |
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 |
NULL, or a numeric seed for the random number generator. |
verbose |
a logical. |
Details
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
.
Value
a linkdat
object equal to x
except its
markerdata
entry, which consists of the N
simulated markers.
References
G. M. Lathrop, J.-M. Lalouel, C. Julier, and J. Ott, Strategies for Multilocus Analysis in Humans, PNAS 81(1984), pp. 3443-3446.
See Also
Examples
x = nuclearPed(2)
partial = marker(x, 3, 1, alleles=1:3)
markerSim(x, N=1, alleles=1:3)
markerSim(x, N=1, partialmarker=partial)
markerSim(x, N=1, partialmarker=partial)
markerSim(x, N=1, available=4, partialmarker=partial)