compute_snpQ2rw | R Documentation |
Compute SNP-specific Q2 by averaging over all pairs of samples using weighting averages of pairwise Q2 (eq. A47 in Hivert et al., 2018)
.compute_snpQ2rw(refcount, totcount, pairs, sampsize, readcount, verbose)
refcount |
Matrix of nsnpxnpop with counts (genotype or reads) for the reference allele |
totcount |
Matrix of nsnpxnpop with total counts or read coverages |
pairs |
Matrix of npoppairsx2 giving the index for all the pairs of pops included in the computation |
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) |
Compute SNP-specific Q2 by averaging over all pairs of samples using weighting averages of pairwise Q2 (eq. A47 in Hivert et al., 2018) (useful for Fst computation with method Identity).
Return a vector of length nsnps with SNP-specific Q2
#
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.