Description Usage Arguments Value Author(s) See Also Examples
Simulate recombination events given the vector of snp locations and recombination rate(s). Haldane's function is used to simulate the probabilty of getting an odd number of crossover events between any two snps given their physical distance and the specified recombination rate.
1 | recombine_index(scale, snps)
|
|
either vector of length 1 specifying the genome-wide recombination rate (Morgans/bp)
or a vector of length |
|
a vector gving the locations of snps along a chromosome |
a vector of length snps-1
specifying the location of recombiantion points.
Tyler D. Hether
1 2 3 4 5 6 7 8 9 10 | set.seed(1234567)
# Simulating recombination across 1000 loci randomly spaced
# along a 200kbp chromosome
chromSize <- 2e5 # Chromosome size
l <- 1e3 # number of loci to simulate
c <- 1e-04 # Morgans/bp
snps <- sort(sample(size=l, 1:chromSize, replace=FALSE))
# Find recombination points between all the snps
recomb_points <- recombine_index(scale=c, snps=snps)
recomb_points
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.