linkageSim: Simulate markers linked to a disease locus.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Simulates markers (with up to 4 alleles) conditional on the pedigree structure, affection statuses and disease model.

Usage

1
2
linkageSim(x, N=1, available=x$available, afreq=NULL, partialmarker=NULL, 
           loop_breakers=NULL, unique=FALSE, seed=NULL, verbose=TRUE)

Arguments

x

a linkdat object

N

a positive integer: the number of markers to be simulated

partialmarker

Either NULL (indicating no given marker data), or a marker object.

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.

loop_breakers

a numeric containing IDs of individuals to be used as loop breakers. Relevant only if the pedigree has loops. See breakLoops.

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.

Details

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.

Value

a linkdat object equal to x except its markerdata entry, which consists of the N simulated markers.

Author(s)

Magnus Dehli Vigeland

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

linkage.power

Examples

1
2
3
4
5
6
7
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), loop_breakers=7)


Search within the paramlink package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.