computePairwiseFSTmatrix {poolfstat} | R Documentation |
Compute pairwise population population FST matrix (and possibly all pairwise SNP-specific FST)
computePairwiseFSTmatrix(pooldata, method = "Anova", min.cov.per.pool = -1, max.cov.per.pool = 1e+06, min.maf = -1, output.snp.values = FALSE)
pooldata |
A pooldata object containing Pool-Seq information |
method |
Either "Anova" (default method as described in the manuscript) or "Identity" (relies on an alternative modeling consisting in estimating unbiased Probability of Identity within and across pairs of pools) |
min.cov.per.pool |
Minimal allowed read count (per pool). If at least one pool is not covered by at least min.cov.perpool reads, the position is discarded in the corresponding pairwise comparisons. |
max.cov.per.pool |
Maximal allowed read count (per pool). If at least one pool is covered by more than min.cov.perpool reads, the position is discarded in the corresponding pairwise comparisons. |
min.maf |
Minimal allowed Minor Allele Frequency (computed from the ratio overal read counts for the reference allele over the read coverage) in the pairwise comparisons. |
output.snp.values |
If TRUE, provide SNP-specific pairwise FST for each comparisons (may lead to a huge result object if the number of pools and/or SNPs is large) |
A list with 2 (or 5 if output.snp.values=TRUE) elements:
"PairwiseFSTmatrix": a matrix with npools rows and npools columns containing the pairwise pool FST estimates
"NbOfSNPs": a matrix with npools rows and npools columns containing the number of SNPs satisfying the filtering criteria in pairs of pools (and within each pool in the diagonal)
"PairwiseSnpFST" (if output.snp.values=TRUE): a matrix with nsnp rows and (npools*(npools-1))/2 columns containing the SNP-specific FST estimates for each pair of pools #'
"PairwiseSnpQ1" (if output.snp.values=TRUE): a matrix with nsnp rows and (npools*(npools-1))/2 columns containing the SNP-specific Q1 estimates for each pair of pools #'
"PairwiseSnpQ2" (if output.snp.values=TRUE): a matrix with nsnp rows and (npools*(npools-1))/2 columns containing the SNP-specific Q2 estimates for each pair of pools
To generate subset of pooldata object, see pooldata.subset
make.example.files(writing.dir=tempdir()) pooldata=popsync2pooldata(sync.file=paste0(tempdir(),"/ex.sync.gz"),poolsizes=rep(50,15)) PairwiseFST=computePairwiseFSTmatrix(pooldata)