cumulative_frequency: calculate cumulative allele frequency from a vector of allele...

Description Usage Arguments Value Examples

View source: R/cumulative_frequency.R

Description

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.

Usage

1

Arguments

probs

vector of frequencies

Value

summed cumulative frequency.

Examples

1
2
freqs = runif(100, min=1e-7, max=0.01)
cumulative_frequency(freqs)

jeremymcrae/recessiveStats documentation built on May 19, 2019, 5:08 a.m.