Learn R Programming

poolfstat (version 3.0.0)

compute_snpQ1rw: compute_snpQ1rw

Description

Compute SNP-specific Q1 over all samples using weighting averages of pop. Q1 (eq. A46 in Hivert et al., 2018)

Usage

.compute_snpQ1rw(refcount, totcount, weight, sampsize, readcount, verbose)

Value

Return a vector of length nsnps with SNP-specific Q1

Arguments

refcount

Matrix of nsnpxnpop with counts (genotype or reads) for the reference allele

totcount

Matrix of nsnpxnpop with total counts or read coverages

weight

Vector of length npop giving the weighting scheme (w=1 for allele count data and w=poolsize/(poolsize-1) for PoolSeq data)

sampsize

Vector of length npop giving the haploid sample size (not used for count data)

readcount

Logical (if TRUE PoolSeq data assumed i.e. weights depending on haploid size, otherwise weights depend on total counts)

verbose

Logical (if TRUE progression bar is printed on the terminal)

Details

Compute all the SNP-specific Q1 over all pop. samples using weighting averages of pop. Q1 as in eq. A46 of Hivert et al., 2018 (useful for Fst computation with method Identity).

Examples

Run this code
#

Run the code above in your browser using DataLab