CalcProbsSelection: A function to calculate probabilities that observed...

Description Usage Arguments Value See Also Examples

Description

A function to calculate probabilities that observed frequencies are due to positive selection using MWNCHHypergeo model.

Usage

1
2
CalcProbsSelection(freq.alive, freq.all, map.alive = NULL,
  map.all = NULL)

Arguments

freq.alive

An vector of observed absolute frequencies for the three genotypes in the alive population

freq.all

An vector of observed absolute frequencies for the three genotypes in the population before selection

map.alive

Optional. Integer list containing the ids of specific columns of freq.alive. Increase speed for large scale calls. Items of map.alive must be named "homo.ref", "hetero", "homo.alt", "missval", "total".

map.all

Optional. Integer list containing the ids of specific columns of freq.all. Increase speed for large scale calls. Items of map.all must be named "homo.ref", "hetero", "homo.alt", "missval", "total".

Value

A vector of probabilities : p_neutral is the probability to obtain this distribution with a random picking process, p_select is the probability to obtain this distribution with a picking in a biased urn, odds are the odds used to calculate p_select, lrt is the result of the likelyhood test of p_select uppon p_neutral, p_value is the probability that the distribution is due to positive selection.

See Also

For more information, see CalcOddsPredation and FindIdsGtCounts wich this function binds.

Examples

1
2
3
4
5
6
## Not run: 
f.alive <- c(17, 3, 15, 1, 36)
f.all   <- c(24, 5, 22, 2, 53)
CalcProbsSelection(f.alive, f.all)

## End(Not run)

laurentlab-mpipz/rsurvival documentation built on May 29, 2019, 9:14 a.m.