calculate_dos: Calculate Direction of Selection

Description Usage Arguments Value

View source: R/dos.r

Description

Calculates the Direction of Selection (DoS) statistic from McDonald-Kreitman contingency tables.

Usage

1
calculate_dos(dat, test = TRUE, clean = TRUE)

Arguments

dat

A gene by substitution type data frame or tibble. Each row must correspond to a gene and it must have columns Dn, Ds, Pn and Ps, corresponding to the McDonald-Kreitman contingency table of each gene.

test

It TRUE, a Z-test will be performed on the DoS statistic.

clean

If TRUE, genes where DoS is undefined (either Dn and Ds are both zero, or Pn and Ps are both zero), will be removed from the result.

Value

A tibble with the same columns as Dat plus a column named DoS. If test is passed, a column named p.value will also be included unless such a column already exists. In that case a column with the name DoS.p.value will be included


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