gwpcr: Binomial Galton-Watson Model for the Polymerase Chain...

Description Usage Arguments Details See Also

Description

Limit distribution of molecular family sizes (i.e. number of post-amplification copies of each kind of molecule present in the pre-amplifcation reaction mix) relative to the expected value after many cycles as prediced by a binomial Galton-Watson model of the polymerase chain reaction (PCR). Parameters are efficiency and molecules – the former is the probability that a molecule is duplicated during a particular PCR cycle, the latter the initial number of copies of in the reaction mix.

Note that a molecule refers to single strand here, and complementary strands are not distinguished. Setting molecules=2 thus models a PCR reaction starting from a single piece of double-stranded DNA.

dgwpcr (resp. pgwpcr) evaluate the density (resp. the CDF) at the given relative family size l for parameters efficiency and molecules. dgwpcr.fun (resp. pgwpcr.fun) return a unary function which represents the density (resp. CDF) for the given parameters. rgwpcr draws random samples by simulation. If the number of PCR cycles to use is not specified, the simulation is stopped once the expected absolute family siye reaches one million molecules, at which point the distribution is considered to be close to the limit distribution for infinitly many cycles.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
rgwpcr(
  n,
  efficiency,
  molecules = 1,
  method = NULL,
  cycles = Inf,
  allow.ties = is.finite(cycles)
)

dgwpcr(l, efficiency, molecules = 1)

dgwpcr.fun(efficiency, molecules = 1)

pgwpcr.fun(efficiency, molecules = 1)

pgwpcr(l, efficiency, molecules = 1)

Arguments

n

number of random samples to generate

efficiency

efficiency of amplification

molecules

initial copy number

method

the method used to draw from the PCR distribution. "simulate" simulates a Galton-Watson branching process modeling PCR, "gamma" uses approximates the PCR distribution with a Gamma distribution. By default, the Gamma approximation is used for small efficiencies, where it is quite good and where simulations are computationally expensive.

cycles

number of amplification cycles used for simulation. By default, a large enough value is used to make the results virtually idistinguishable from the limit for cycles \to ∞

allow.ties

by default, if cycles is set to "infinity" (which really means "sufficiency many"), the simulation continues until no more ties (i.e. two values with the same value) are found within the generated samples. If allow.ties is set to TRUE, the simulation is always stopped after the numer of cycles estimated to be required for the results to be "close" to the limit distribution, regardless of whether the resulting family sizes contain duplicates. If a specific, finite sample count is specified, allow.ties defaults to FALSE.

l

molecular family size relative to the average

Details

The binomial Galton-Watson PCR model treats PCR as a branching process. At time 0, the absolute number of molecules c_n is the initial copy number molecules. Each time step from c_n to c_(n+1) corresponds to a PCR cycle and duplicates each of the c_n molecules with the probability specified in parameter efficiency (E). Thus,

c_(c+1) = c_n + Binomial(c_n, E).

Each cycle thus increases the expected molecule count by a factor of (1+E). The relative size of molecular families after n cycles is therefore

l_n = c_n (1+E)^-n.

dgwpcr (resp. rgwpcr) is the density (resp. CDF) of the a.c. limit in distribution of l_n for n to ∞. Essentially, the reason that l_n converges in distribution is that the larger the number of molecules c_n, the smaller the additional variability introduced into c_(n+1) by the term Binomial(c_n, E).. For reasonably large efficiencies, that becomes quickly negligible compared to c_n. Assume e.g. an efficiency of 50%, and that c_n=2500. The standard deviation of the binomial term is then already only 25, i.e. 1% of c_n, and this state can be expected to be reached after about 20 cycles.

For this reason, using the limit distribution still yields a model of the polymerase chain reaction that is sufficiently accurate for most purposes.

See Also

gwpcr.sd

gwpcr.mixture

gwpcrpois


Cibiv/gwpcR documentation built on Aug. 31, 2021, 1:20 p.m.