recombine_index: Simulate recombination points along a chromosome.

Description Usage Arguments Value Author(s) See Also Examples

Description

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.

Usage

1

Arguments

scale

either vector of length 1 specifying the genome-wide recombination rate (Morgans/bp) or a vector of length snps-1 specifying the recombination rate between all snps. In either case rates must be positive.

snps

a vector gving the locations of snps along a chromosome

Value

a vector of length snps-1 specifying the location of recombiantion points.

Author(s)

Tyler D. Hether

See Also

make_parents

Examples

 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

tylerhether/fbgenotyper documentation built on May 3, 2019, 1:53 p.m.