linkageSim | R Documentation |
Simulates markers (with up to 4 alleles) conditional on the pedigree structure, affection statuses and disease model.
linkageSim( x, N = 1, available = x$available, afreq = NULL, partialmarker = NULL, loop_breakers = NULL, unique = FALSE, seed = NULL, verbose = TRUE )
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. |
afreq |
a vector of length < 5 containing the population frequencies for the marker alleles. |
partialmarker |
Either NULL (indicating no given marker data), or a
|
loop_breakers |
a numeric containing IDs of individuals to be used as
loop breakers. Relevant only if the pedigree has loops. See
|
unique |
a logical indicating if duplicates among the simulated markers should be removed. |
seed |
NULL, or a numeric seed for the random number generator. |
verbose |
a logical. |
All markers are simulated under the condition that the recombination fraction between the marker and the disease locus is 0. This is an implementation of the algorithm used in SLINK of the LINKAGE/FASTLINK suite.
a linkdat
object equal to x
except its
markerdata
entry, which consists of the N
simulated markers.
G. M. Lathrop, J.-M. Lalouel, C. Julier, and J. Ott (1984). Strategies for Multilocus Analysis in Humans, PNAS 81, pp. 3443-3446.
linkage.power
x = linkdat(toyped, model=1) y = linkageSim(x, N=10, afreq=c(0.5, 0.5)) stopifnot(length(mendelianCheck(y))==0) z = addOffspring(cousinPed(1), father=7, mother=8, noffs=1, aff=2) z = setModel(z, 2) linkageSim(z, N=1, afreq = c(0.1, 0.2, 0.7))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.