genome_wide_ni: Calculate genome-wide NI and alpha

Description Usage Arguments Details Value Author(s)

View source: R/genome_wide_ni.r

Description

Reads a file from MKtest.py and uses the TG estimator to calculate a genome-wide neutrality index as well as alpha

Usage

1
genome_wide_ni(file, na = c("nan", "NA", ""))

Arguments

file

File to a tab-delimited file. Should have Dn, Ds, Pn, and Ps columns, and one row per gene.

na

Vector corresponding to NaN values.

Details

Uses estimatro NI_TG as fefined by Stoletzki & Eyre-Walker 2011. Based on work from Tarone 1981 and Greenland 1982.

NI_{TG} = \frac{∑ D_{si}P_{ni}/(P_{si} + D_{si})}{∑ P_{si}D_{ni}/(P_{si} + D_{si})}

where i is the i-th gene.

Value

vector with NI and alpha

Author(s)

Sur Herrera Paredes


surh/HMVAR documentation built on Aug. 18, 2021, 1:21 a.m.