extract_afs_simple | R Documentation |
Prepare data for various ADMIXTOOLS 2 functions. Reads data from packedancestrymap or PLINK files,
and computes allele frequencies for selected populations and stores it as .rds
files in outdir.
extract_afs_simple(
pref,
outdir,
inds = NULL,
pops = NULL,
blgsize = 0.05,
cols_per_chunk = 10,
maxmiss = 0,
minmaf = 0,
maxmaf = 0.5,
minac2 = FALSE,
outpop = NULL,
transitions = TRUE,
transversions = TRUE,
keepsnps = NULL,
format = NULL,
poly_only = FALSE,
adjust_pseudohaploid = TRUE,
verbose = TRUE
)
pref |
Prefix of PLINK/EIGENSTRAT/PACKEDANCESTRYMAP files.
EIGENSTRAT/PACKEDANCESTRYMAP have to end in |
outdir |
Directory where data will be stored. |
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 |
cols_per_chunk |
Number of populations per chunk. Lowering this number will lower the memory requirements when running |
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 |
minac2 |
Discard SNPs with allele count lower than 2 in any population (default |
outpop |
Keep only SNPs which are heterozygous in this population |
transitions |
Set this to |
transversions |
Set this to |
keepsnps |
SNP IDs of SNPs to keep. Overrides other SNP filtering options |
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 |
poly_only |
Specify whether SNPs with identical allele frequencies in every population should be discarded ( |
adjust_pseudohaploid |
Genotypes of pseudohaploid samples are usually coded as |
verbose |
Print progress updates |
SNP metadata (invisibly)
## Not run:
pref = 'my/genofiles/prefix'
outdir = 'dir/for/afdata/'
extract_afs(pref, outdir)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.