joint.given.two: Crossover locations given there are two

View source: R/gammaDensities.R

joint.given.twoR Documentation

Crossover locations given there are two

Description

Calculates the joint density of the crossover locations on a random meiotic product, given that there are precisely two crossovers, for the gamma model.

Usage

joint.given.two(
  nu,
  L = 103,
  x = NULL,
  y = NULL,
  n = 20,
  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, locations of the first crossover.

y

If specified, locations of the second crossover.

n

Number of points at which to calculate the density. The points will be evenly distributed between 0 and L. Ignored if x and y are 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;\nu) 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}^{\infty} f_k(x;\nu)/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^*.

Value

A data frame with three columns: x and y are the locations (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.

Author(s)

Karl W Broman, broman@wisc.edu

References

Broman, K. W. and Weber, J. L. (2000) Characterization of human crossover interference. Am. J. Hum. Genet. 66, 1911–1926.

Broman, K. W., Rowe, L. B., Churchill, G. A. and Paigen, K. (2002) Crossover interference in the mouse. Genetics 160, 1123–1131.

McPeek, M. S. and Speed, T. P. (1995) Modeling interference in genetic recombination. Genetics 139, 1031–1044.

See Also

location.given.one(), distance.given.two(), first.given.two(), ioden(), firstden(), xoprob(), gammacoi()

Examples


# Calculate the distribution of the average of the crossover locations,
# given that there are two and that they are separated by 20 cM
# (for a chromosome of length 200 cM)
L <- 200
d <- 20
x <- seq(0, L-d, by=0.5)
y <- x+d

f <- joint.given.two(4.3, L=L, x, y)
f$f <- f$f / distance.given.two(4.3, L, d)$f
plot((f$x+f$y)/2, f$f, type="l", xlim=c(0, L), ylim=c(0,max(f$f)),
     lwd=2, xlab="Average location", ylab="Density")
abline(v=c(d/2,L-d/2), h=1/(L-d), lty=2, lwd=2)


kbroman/xoi documentation built on May 1, 2023, 9:35 p.m.