Description Usage Arguments Value Examples
View source: R/cumulative_frequency.R
Rather than simply summing the individual allele frequencies to get a cumulative frequency, we need to take the chance of having two variants on one chromosome into account. The chance of observing two variants on the same chromosome is their frequencies multiplied together (e.g. p1 * p2), so the probability of seeing them on independent chromosomes is p1 * (1 - p2). This can be extended beyond two variants, to simply account for the probability of the preceeding variants.
1 | cumulative_frequency(probs)
|
probs |
vector of frequencies |
summed cumulative frequency.
1 2 | freqs = runif(100, min=1e-7, max=0.01)
cumulative_frequency(freqs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.