f2_from_geno | R Documentation |
This function prepares data for various other ADMIXTOOLS 2 functions. It reads data from genotype files, computes allele frequencies and blocked f2-statistics for selected populations, and returns them as a 3d array.
f2_from_geno(
pref,
inds = NULL,
pops = NULL,
blgsize = 0.05,
maxmem = 8000,
maxmiss = 0,
minmaf = 0,
maxmaf = 0.5,
pops2 = NULL,
outpop = NULL,
outpop_scale = TRUE,
transitions = TRUE,
transversions = TRUE,
auto_only = TRUE,
keepsnps = NULL,
afprod = FALSE,
fst = FALSE,
poly_only = c("f2"),
format = NULL,
adjust_pseudohaploid = TRUE,
remove_na = TRUE,
apply_corr = TRUE,
qpfstats = FALSE,
verbose = TRUE,
...
)
pref |
Prefix of PLINK/EIGENSTRAT/PACKEDANCESTRYMAP files.
EIGENSTRAT/PACKEDANCESTRYMAP have to end in |
inds |
Individuals for which data should be extracted |
pops |
Populations for which data should be extracted. If both |
blgsize |
SNP block size in Morgan. Default is 0.05 (5 cM). If |
maxmem |
Maximum amount of memory to be used. If the required amount of memory exceeds |
maxmiss |
Discard SNPs which are missing in a fraction of populations higher than |
minmaf |
Discard SNPs with minor allele frequency less than |
maxmaf |
Discard SNPs with minor allele frequency greater than than |
pops2 |
If specified, only a pairs between |
outpop |
Keep only SNPs which are heterozygous in this population |
outpop_scale |
Scale f2-statistics by the inverse |
transitions |
Set this to |
transversions |
Set this to |
auto_only |
Keep only SNPs on chromosomes 1 to 22 |
keepsnps |
SNP IDs of SNPs to keep. Overrides other SNP filtering options |
afprod |
Return negative average allele frequency products instead of f2-statistics.
Setting |
fst |
Write files with pairwise FST for every population pair. Setting this to FALSE can make |
poly_only |
Specify whether SNPs with identical allele frequencies in every population should be discarded ( |
format |
Supply this if the prefix can refer to genotype data in different formats
and you want to choose which one to read. Should be |
adjust_pseudohaploid |
Genotypes of pseudohaploid samples are usually coded as |
apply_corr |
Apply small-sample-size correction when computing f2-statistics (default |
qpfstats |
Compute smoothed f2-statistics (default |
verbose |
Print progress updates |
... |
Pass arguments to |
A 3d array of f2-statistics (or scaled allele frequency products if afprod = TRUE
)
f2_from_precomp
for reading previously stored f2-statistics into R, extract_f2
for storing f2-statistics on disk
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.