R: Distance between crossovers given there are two
distance.given.two
R Documentation
Distance between crossovers given there are two
Description
Calculates the density of the distance between the crossovers on a meiotic
product, given that there are precisely two crossovers, for the gamma model.
Usage
distance.given.two(nu, L = 103, x, n = 400, max.conv = 25,
integr.tol = 0.00000001, max.subd = 1000, min.subd = 10)
Arguments
nu
The interference parameter in the gamma model.
L
The length of the chromsome in cM.
x
If specified, points at which to calculate the density.
n
Number of points at which to calculate the density. The points
will be evenly distributed between 0 and L. Ignored if x is
specified.
max.conv
Maximum limit for summation in the convolutions to get
inter-crossover distance distribution from the inter-chiasma distance
distributions. This should be greater than the maximum number of chiasmata
on the 4-strand bundle.
integr.tol
Tolerance for convergence of numerical integration.
max.subd
Maximum number of subdivisions in numerical integration.
min.subd
Minimum number of subdivisions in numerical integration.
Details
Let f(x;nu) denote the density of a gamma random variable
with parameters shape=nu and rate=2 nu, and let
f_k(x;ν) denote the density of a gamma random variable
with parameters shape=k nu and rate=2 nu.
The distribution of the distance from one crossover to the next is
f*(x;nu) = sum_(k=1 to
infty) f_k(x;ν)/2^k.
The distribution of the distance from the start of the chromosome to the
first crossover is g*(x;nu) = 1 -
F*(x;nu) where F* is the cdf of f*.
We calculate the distribution of the distance between crossovers on a
product with two crossovers by first calculating the joint distribution of
the location of the two crossovers, given that they both occur before L and
the third occurs after L, and then integrating out the location of the first
crossover.
Value
A data frame with two columns: x is the distance (between 0
and L, in cM) at which the density was calculated and f is the
density.
Warning
We sometimes have difficulty with the numerical
integrals. You may need to use large min.subd (e.g. 25) to get
accurate results.