checkSNP: Obtaine Appropriate SNPs for Ne Estimation

Description Usage Arguments Details Value Author(s)

View source: R/estne.R

Description

checkSNP helps to filter for those SNPs that are best suited for estimating Ne.

Usage

1
checkSNP(p0, pt, cov0, covt, truncAF = NA)

Arguments

p0

numeric vector of relative starting allele frequencies (0 <= p0 <= 1).

pt

numeric vector of relative allele frequencies after t generations (0 <= pt <= 1).

cov0

numeric vector of sequencing coverage at the first time point.

covt

numeric vector of sequencing coverage at the second time point.

truncAF

numeric indicating whether SNPs with extreme allele frequencies should be excluded for Ne estimation. If truncAF = NA (default) even extreme allele frequencies will be considered. If truncAF = F then only SNPs with an allele frequency >= F and <= 1-F will be considered for Ne estimation.

Details

Alleles that start from a frequency of 0 or 1 are not informative for Ne estimation and checkSNP will return FALSE for those ones. Similarly positions with a sequencing coverage of 0 will be masked, and checkSNP will return FALSE.

Extreme allele frequencies, which are close to 0 or 1, increase the variance of Ne estimates and it might therefore be advantageous not to consider them for Ne estimation. The parameter truncAF can be used for this purpose.

Value

A logical vector indicating which SNPs are suited for Ne estimation.

Author(s)

Thomas Taus


ThomasTaus/poolSeq documentation built on Feb. 17, 2020, 1:52 p.m.