compute_Q2: compute_Q2

compute_Q2R Documentation

compute_Q2

Description

Compute all Q2 for each block-jackknife block (if any) and overall SNPs (within or outside blocks)

Usage

.compute_Q2(refcount, totcount, nblocks, block_id, verbose)

Arguments

refcount

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

totcount

Matrix of nsnpxnpop with total counts or read coverages

nblocks

Integer giving the number of block-jackknife blocs (may be 0 if no block-jackknife)

block_id

Integer vector of length nsnps with the (0-indexed) id of the block to which each SNP belongs (-1 for SNPs outside blocks)

verbose

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

Details

Compute all Q2 for each block-jackknife block (if any) and overall SNPs (within or outside blocks).

Value

Return a matrix with npops*(npops-1)/2 and nblocks+1 column giving the mean Q2 of each pairwise pop comp. within each block and for all SNPs (last column)

Examples

#

poolfstat documentation built on Sept. 8, 2023, 5:49 p.m.