FWW: FWW correction method

Description Usage Arguments Details Value Examples

View source: R/FWW.R

Description

MKT calculation corrected using FWW method (Fay et al. 2001 Genetics).

Usage

1
FWW(daf, divergence, listCutoffs = c(0, 0.05, 0.1), plot = FALSE)

Arguments

daf

data frame containing DAF, Pi and P0 values

divergence

data frame containing divergent and analyzed sites for selected (i) and neutral (0) classes

listCutoffs

list of cutoffs to use (optional). Default cutoffs are: 0, 0.05, 0.1

plot

report plot (optional). Default is FALSE

Details

In the standard McDonald and Kreitman test, the estimate of adaptive evolution (alpha) can be easily biased by the segregation of slightly deleterious non-synonymous substitutions. Specifically, slightly deleterious mutations contribute more to polymorphism than they do to divergence, and thus, lead to an underestimation of alpha. Because they tend to segregate at lower frequencies than do neutral mutations, they can be partially controled by removing low frequency polymorphisms from the analysis. This is known as the FWW method.

Value

MKT corrected by the FWW method. List with alpha results, graph (optional), divergence metrics, MKT tables and negative selection fractions

Examples

1
2
3
4
## Using default cutoffs
FWW(myDafData, myDivergenceData)
## Using custom cutoffs and rendering plot
FWW(myDafData, myDivergenceData, c(0.05, 0.1, 0.15), plot=TRUE)

sergihervas/iMKT documentation built on May 3, 2019, 1:49 p.m.