Description Usage Arguments Details Examples
This function takes a allele frequency data and computes blocked f2 statistics for all population pairs,
which are written to outdir
. f2 for each SNP is computed as
(p1  p2)^2  p1 (1  p1)/(n1  1)  p2 (1  p2)/(n2  1), where p1 and p2 are
allele frequencies in populations 1 and 2, and n1 and n2 is the number of
nonmissing haplotypes in populations 1 and 2. See details
1 2 3 4 5 6 7 8 9 10 11 12 
afdat 
A list with three items with the same SNP in each row (generated by

maxmem 
split up allele frequency data into blocks, if memory requirements exceed 
blgsize 
SNP block size in Morgan. Default is 0.05 (50 cM). If 
poly_only 
Exclude sites with identical allele frequencies in all populations 
outpop 
If specified, f2statistics will be weighted by heterozygosity in this population 
outdir 
Directory into which to write f2 data (if 
overwrite 
Should existing files be overwritten? Only relevant if 
verbose 
Print progress updates 
pop1 

pop2 

For each population pair, each of the i = 1, …, n resutling values (n is around 700 in practice) is the mean f2 estimate across all SNPs except the ones in block i.
 p1 (1  p1)/(2 n1  1)  p2 (1  p2)/(2 n2  1) is a correction term which makes the estimates unbiased at low sample sizes.
1 2 3 4 5  ## Not run:
afdat = plink_to_afs('/my/geno/prefix')
afs_to_f2_blocks(afdat, outdir = '/my/f2/data/')
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.