| extract_afs | 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(
  pref,
  outdir,
  inds = NULL,
  pops = NULL,
  cols_per_chunk = 10,
  numparts = 100,
  maxmiss = 0,
  minmaf = 0,
  maxmaf = 0.5,
  minac2 = FALSE,
  outpop = NULL,
  auto_only = TRUE,
  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  | 
| cols_per_chunk | Number of populations per chunk. Lowering this number will lower the memory requirements when running  | 
| numparts | Number of parts in which genotype data will be read for computing allele frequencies | 
| 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 | 
| auto_only | Keep only SNPs on chromosomes 1 to 22 | 
| 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.